BeRTOS
ser_sam3.h
Go to the documentation of this file.
00001 
00039 #ifndef SER_SAM3_H
00040 #define SER_SAM3_H
00041 
00042 #include <cfg/macros.h> /* BV() */
00043 #include <cfg/compiler.h>  /* uint32_t */
00044 #include <cpu/detect.h>  /* CPU_* */
00045 
00047 /*\{*/
00048 typedef uint32_t serstatus_t;
00049 
00050 /* Software errors */
00051 #define SERRF_RXFIFOOVERRUN  BV(0)  
00052 #define SERRF_RXTIMEOUT      BV(1)  
00053 #define SERRF_TXTIMEOUT      BV(2)  
00055 /*
00056  * Hardware errors.
00057  * These flags map directly to the ARM USART Channel Status Register (US_CSR).
00058  */
00059 #define SERRF_RXSROVERRUN    BV(5)  
00060 #define SERRF_FRAMEERROR     BV(6)  
00061 #define SERRF_PARITYERROR    BV(7)  
00062 #define SERRF_NOISEERROR     0      
00063 /*\}*/
00064 
00070 enum
00071 {
00072     SER_UART0,
00073 #if !CPU_CM3_SAM3U
00074     SER_UART1,
00075 #endif
00076     SER_SPI0,
00077     SER_CNT  
00078 };
00079 /*\}*/
00080 
00081 #endif /* SER_SAM3_H */