BeRTOS
ser_at91.h
Go to the documentation of this file.
00001 
00039 #ifndef SER_AT91_H
00040 #define SER_AT91_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 SER_UART1,
00074 SER_SPI0,
00075 #if CPU_ARM_SAM7X
00076 SER_SPI1,
00077 #endif
00078 SER_CNT  
00079 };
00080 /*\}*/
00081 
00082 #endif /* SER_AT91_H */