PIC24 Support Libraries
esos_pic24_ecan.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2008 Robert B. Reese, Bryan A. Jones, J. W. Bruce ("AUTHORS")"
3  * All rights reserved.
4  * (R. Reese, reese_AT_ece.msstate.edu, Mississippi State University)
5  * (B. A. Jones, bjones_AT_ece.msstate.edu, Mississippi State University)
6  * (J. W. Bruce, jwbruce_AT_ece.msstate.edu, Mississippi State University)
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation for any purpose, without fee, and without written agreement is
10  * hereby granted, provided that the above copyright notice, the following
11  * two paragraphs and the authors appear in all copies of this software.
12  *
13  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
15  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
16  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17  *
18  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
23  *
24  * Please maintain this header in its entirety when copying/modifying
25  * these files.
26  *
27  *
28  */
29 
30 /**
31  * \addtogroup ESOS_Task_ECAN_Service
32  * @{
33  */
34 
35  /** \file
36  * \brief This file contains routines which configure and
37  * use an ECAN interface on the Microchip PIC24 MCUs.
38  */
39 
40 #ifndef ESOS_PIC24_ECAN_H
41 #define ESOS_PIC24_ECAN_H
42 
43 #include "esos.h"
44 #include "esos_pic24.h"
45 
46 #define __ESOS_ECAN_HW_NUM_TX_BUFS 1
47 #define __ESOS_ECAN_HW_NUM_BUFS 8
48 
49 #define __ESOS_ECAN_HW_ARE_MESSAGES_WAITING() ( _DMA1IF )
50 #define __ESOS_ECAN_HW_GET_BUFFER_ID() ( C1FIFO & 0x1F )
51 #define __ESOS_ECAN_HW_TX_IN_PROGRESS() ( C1TR01CONbits.TXREQ0 )
52 
53 void __esos_ecan_hw_config_ecan ( void );
54 void __esos_ecan_hw_config_baud ( void );
55 void __esos_ecan_hw_config_rxFilter ( );
56 void __esos_ecan_hw_config_dma_tx ( void );
57 void __esos_ecan_hw_config_dma_rx ( void );
58 void __esos_ecan_hw_mark_message_received ( uint16_t u16_rx_buff_id );
59 void __esos_ecan_hw_format_and_send ( ECANMSG *p_temp_Msg, uint16_t u16_can_id, uint8_t u8_payload_len );
60 
61 #endif /* ESOS_PIC24_ECAN_H */
This is the master include file for implementing ESOS on Microchip PIC24 MCUs.
unsigned char uint8_t
An abbreviation for an 8-bit unsigned integer.
Definition: dataXferImpl.h:194