MODSERIAL with support for more devices
Fork of MODSERIAL by
Device/MODSERIAL_KL25Z.cpp@49:18f8dc534348, 2018-01-29 (annotated)
- Committer:
- Tejas Kale
- Date:
- Mon Jan 29 23:16:48 2018 +0100
- Revision:
- 49:18f8dc534348
- Parent:
- 43:8c8d13e1840b
Fix Compiler warnings
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sissors | 27:9c93ce7cb9d8 | 1 | #ifdef TARGET_KL25Z |
Sissors | 27:9c93ce7cb9d8 | 2 | #include "MODSERIAL.h" |
Sissors | 27:9c93ce7cb9d8 | 3 | |
Sissors | 27:9c93ce7cb9d8 | 4 | void MODSERIAL::setBase(void ) { |
cduck | 43:8c8d13e1840b | 5 | #if DEVICE_SERIAL_ASYNCH |
cduck | 43:8c8d13e1840b | 6 | switch( _serial.serial.index ) { |
cduck | 43:8c8d13e1840b | 7 | #else |
Sissors | 27:9c93ce7cb9d8 | 8 | switch( _serial.index ) { |
cduck | 43:8c8d13e1840b | 9 | #endif |
Sissors | 27:9c93ce7cb9d8 | 10 | case 0: _base = UART0; _IRQ = UART0_IRQn; break; |
Sissors | 27:9c93ce7cb9d8 | 11 | case 1: _base = UART1; _IRQ = UART1_IRQn; break; |
Sissors | 27:9c93ce7cb9d8 | 12 | case 2: _base = UART2; _IRQ = UART2_IRQn; break; |
Sissors | 27:9c93ce7cb9d8 | 13 | default: _base = NULL; _IRQ = (IRQn_Type)NULL; break; |
Sissors | 27:9c93ce7cb9d8 | 14 | } |
Sissors | 27:9c93ce7cb9d8 | 15 | } |
Sissors | 27:9c93ce7cb9d8 | 16 | |
Sissors | 28:76793a84f9e5 | 17 | void MODSERIAL::initDevice(void) {}; |
Sissors | 28:76793a84f9e5 | 18 | |
Sissors | 27:9c93ce7cb9d8 | 19 | bool MODSERIAL::txIsBusy( void ) |
Sissors | 27:9c93ce7cb9d8 | 20 | { |
Sissors | 27:9c93ce7cb9d8 | 21 | return ( ((UART_Type*)_base)->S1 & ( 1UL << 6 ) == 0 ) ? true : false; |
Sissors | 27:9c93ce7cb9d8 | 22 | } |
Sissors | 27:9c93ce7cb9d8 | 23 | #endif |
Sissors | 27:9c93ce7cb9d8 | 24 |