Lines Matching refs:obj
41 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument
43 obj->UartId = uartId; in UartMcuInit()
48 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit()
57 GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART2 ); in UartMcuInit()
58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART2 ); in UartMcuInit()
62 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument
64 if( obj->UartId == UART_USB_CDC ) in UartMcuConfig()
67 UartUsbConfig( obj, mode, baudrate, wordLength, stopBits, parity, flowCtrl ); in UartMcuConfig()
77 if( obj->FifoTx.Data == NULL ) in UartMcuConfig()
85 if( obj->FifoRx.Data == NULL ) in UartMcuConfig()
93 if( ( obj->FifoTx.Data == NULL ) || ( obj->FifoRx.Data == NULL ) ) in UartMcuConfig()
172 void UartMcuDeInit( Uart_t *obj ) in UartMcuDeInit() argument
174 if( obj->UartId == UART_USB_CDC ) in UartMcuDeInit()
177 UartUsbDeInit( obj ); in UartMcuDeInit()
186 GpioInit( &obj->Tx, obj->Tx.pin, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in UartMcuDeInit()
187 GpioInit( &obj->Rx, obj->Rx.pin, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in UartMcuDeInit()
191 uint8_t UartMcuPutChar( Uart_t *obj, uint8_t data ) in UartMcuPutChar() argument
193 if( obj->UartId == UART_USB_CDC ) in UartMcuPutChar()
196 return UartUsbPutChar( obj, data ); in UartMcuPutChar()
206 if( IsFifoFull( &obj->FifoTx ) == false ) in UartMcuPutChar()
208 FifoPush( &obj->FifoTx, TxData ); in UartMcuPutChar()
221 uint8_t UartMcuGetChar( Uart_t *obj, uint8_t *data ) in UartMcuGetChar() argument
223 if( obj->UartId == UART_USB_CDC ) in UartMcuGetChar()
226 return UartUsbGetChar( obj, data ); in UartMcuGetChar()
235 if( IsFifoEmpty( &obj->FifoRx ) == false ) in UartMcuGetChar()
237 *data = FifoPop( &obj->FifoRx ); in UartMcuGetChar()
246 uint8_t UartMcuPutBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size ) in UartMcuPutBuffer() argument
248 if( obj->UartId == UART_USB_CDC ) in UartMcuPutBuffer()
251 return UartUsbPutBuffer( obj, buffer, size ); in UartMcuPutBuffer()
264 while( UartPutChar( obj, buffer[i] ) != 0 ) in UartMcuPutBuffer()
279 uint8_t UartMcuGetBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size, uint16_t *nbReadBytes ) in UartMcuGetBuffer() argument
285 if( UartGetChar( obj, buffer + localSize ) == 0 ) in UartMcuGetBuffer()