Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function UartMcuPutBuffer missing #1

Open
SloMusti opened this issue Apr 27, 2018 · 2 comments
Open

Function UartMcuPutBuffer missing #1

SloMusti opened this issue Apr 27, 2018 · 2 comments

Comments

@SloMusti
Copy link

SloMusti commented Apr 27, 2018

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
}
@SloMusti SloMusti changed the title Function UartMcuPutBuffer missingg Function UartMcuPutBuffer missing Apr 27, 2018
@jcaridadhdez
Copy link
Owner

I can't implement this code as "UartContext is not declared" but it would be useful to communicate with gps.

I'll try to perform the code

@SloMusti
Copy link
Author

I have tried to see if UART TX is working at all and even using the function UartMcuPutChar that is implemented will hang the processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants