Dependents:   Autoflight2018_22_MODSERIAL

Fork of MODSERIAL by Erik -

Committer:
TUATBM
Date:
Tue Sep 18 08:03:54 2018 +0000
Revision:
47:8d2e26e2345c
Parent:
45:da0788f0bd77
401????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rvasquez6089 45:da0788f0bd77 1 #ifdef TARGET_NUCLEO_F746ZG
rvasquez6089 45:da0788f0bd77 2 #include "MODSERIAL.h"
rvasquez6089 45:da0788f0bd77 3
rvasquez6089 45:da0788f0bd77 4 void MODSERIAL::setBase(void ) {
rvasquez6089 45:da0788f0bd77 5 #if DEVICE_SERIAL_ASYNCH
rvasquez6089 45:da0788f0bd77 6 switch( _serial.serial.index ) {
rvasquez6089 45:da0788f0bd77 7 #else
rvasquez6089 45:da0788f0bd77 8 switch( _serial.index ) {
rvasquez6089 45:da0788f0bd77 9 #endif
rvasquez6089 45:da0788f0bd77 10 case 0: _base = USART1; _IRQ = USART1_IRQn; break;
rvasquez6089 45:da0788f0bd77 11 case 1: _base = USART2; _IRQ = USART2_IRQn; break;
rvasquez6089 45:da0788f0bd77 12 case 2: _base = USART3; _IRQ = USART3_IRQn; break;
rvasquez6089 45:da0788f0bd77 13 case 3: _base = USART6; _IRQ = USART6_IRQn; break;
rvasquez6089 45:da0788f0bd77 14 default: _base = NULL; _IRQ = (IRQn_Type)NULL; break;
rvasquez6089 45:da0788f0bd77 15 }
rvasquez6089 45:da0788f0bd77 16 }
rvasquez6089 45:da0788f0bd77 17
rvasquez6089 45:da0788f0bd77 18 void MODSERIAL::initDevice(void) {};
rvasquez6089 45:da0788f0bd77 19
rvasquez6089 45:da0788f0bd77 20 bool MODSERIAL::txIsBusy( void )
rvasquez6089 45:da0788f0bd77 21 {
rvasquez6089 45:da0788f0bd77 22 return ( (((USART_TypeDef*)_base)->ISR & ( 1UL << 6 )) == 0 ) ? true : false;
rvasquez6089 45:da0788f0bd77 23 }
rvasquez6089 45:da0788f0bd77 24
rvasquez6089 45:da0788f0bd77 25 #endif