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_AF7_USART2 ); in UartMcuInit()
58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_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()
169 void UartMcuDeInit( Uart_t *obj ) in UartMcuDeInit() argument
171 if( obj->UartId == UART_USB_CDC ) in UartMcuDeInit()
174 UartUsbDeInit( obj ); in UartMcuDeInit()
183 GpioInit( &obj->Tx, obj->Tx.pin, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in UartMcuDeInit()
184 GpioInit( &obj->Rx, obj->Rx.pin, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in UartMcuDeInit()
188 uint8_t UartMcuPutChar( Uart_t *obj, uint8_t data ) in UartMcuPutChar() argument
190 if( obj->UartId == UART_USB_CDC ) in UartMcuPutChar()
193 return UartUsbPutChar( obj, data ); in UartMcuPutChar()
203 if( IsFifoFull( &obj->FifoTx ) == false ) in UartMcuPutChar()
205 FifoPush( &obj->FifoTx, TxData ); in UartMcuPutChar()
218 uint8_t UartMcuGetChar( Uart_t *obj, uint8_t *data ) in UartMcuGetChar() argument
220 if( obj->UartId == UART_USB_CDC ) in UartMcuGetChar()
223 return UartUsbGetChar( obj, data ); in UartMcuGetChar()
232 if( IsFifoEmpty( &obj->FifoRx ) == false ) in UartMcuGetChar()
234 *data = FifoPop( &obj->FifoRx ); in UartMcuGetChar()
243 uint8_t UartMcuPutBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size ) in UartMcuPutBuffer() argument
245 if( obj->UartId == UART_USB_CDC ) in UartMcuPutBuffer()
248 return UartUsbPutBuffer( obj, buffer, size ); in UartMcuPutBuffer()
261 while( UartPutChar( obj, buffer[i] ) != 0 ) in UartMcuPutBuffer()
276 uint8_t UartMcuGetBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size, uint16_t *nbReadBytes ) in UartMcuGetBuffer() argument
282 if( UartGetChar( obj, buffer + localSize ) == 0 ) in UartMcuGetBuffer()