Skip to content

Function UartMcuPutBuffer missing #1

@SloMusti

Description

@SloMusti

UartMcuPutBuffer function is missing from the code, it is defined in uart_board.h but is not present in the .c file, thus some things can not be done, like writing to GPS

Code should be here:

uint8_t UartMcuPutChar( Uart_t *obj, uint8_t data )

I have tried adding the missing function, however I mange to hang the board by doing so:

uint8_t UartMcuPutBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size )
{
    if( IsFifoFull( &obj->FifoTx ) == false )
    {
                BoardDisableIrq( );
        for(uint8_t i=0;i<size;i++){
            FifoPush( &obj->FifoTx, buffer[i]);
        }
                BoardEnableIrq( );
        // Trig UART Tx interrupt to start sending the FIFO contents.
        __HAL_UART_ENABLE_IT( &UartContext[UART_1].UartHandle, USART_IT_TXE );
        return 0; // OK
    }

    return 1; // Busy
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions