diff --git a/README.md b/README.md index f0be96c..37c39f7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Platform-independent interface implemented in [platform.c](BMLite_example/src/pl | bool **platform_init**(uint32_t speed_hz) | Initilalizes hardware | | void **platform_bmlite_reset**(void) | Implements BM-Lite HW Reset | | fpc_bep_result_t **platform_bmlite_send**(uint16_t size, const uint8_t *data, uint32_t timeout, void *session) | Send data packet to FPC BM-LIte | -| fpc_bep_result_t **platform_bmlite_receive**(uint16_t size, uint8_t *data, uint32_t timeout, void *session) | Receive data packet from FPC BM-LIte. If timeout = **0**, the function will wait for data from BM-Lite indefinitely. The waiting loop will be breaked if **platform_check_button_pressed()** returns non-zero value. It is recommended to do HW or SW reset of BM-Lite if **platform_bmlite_receive()** returns **FPC_BEP_RESULT_TIMEOUT** in order to return is into known state. | +| fpc_bep_result_t **platform_bmlite_receive**(uint16_t size, uint8_t *data, uint32_t timeout, void *session) | Receive data packet from FPC BM-LIte. If timeout = **0**, the function will wait for data from BM-Lite indefinitely. The waiting loop will be breaked if **hal_check_button_pressed()** returns non-zero value. It is recommended to do HW or SW reset of BM-Lite if **platform_bmlite_receive()** returns **FPC_BEP_RESULT_TIMEOUT** in order to return is into known state. | Currently **platform_bmlite_send()** and **platform_bmlite_receive()** are implemented for SPI interface. For UART interface there is no need to wait for **IRQ** pin ready. However because in UART mode there is no signal from FPC-BM-LIte that it will send data, I would recommend to use UART interrupt or DMA to receive data from UART and store it to a separate buffer and read data in **platform_bmlite_receive()** from that buffer. Activation UART data reading only inside **platform_bmlite_receive()** could lead to loosing some incoming data and causing HCP protocol errors. @@ -45,7 +45,7 @@ For porting the project to a new microcontroller, all functions from [bmlite_hal | HAL Function | Description | | :------------ | :------------ | | uint32_t **hal_get_button_press_time**(void) | How long UI button was pressed last time. Also it should reset button pressed time counter | -| uint32_t **platform_check_button_pressed**(void) | Used for breaking waiting in **platform_bmlite_receive()** if returns not 0 | +| uint32_t **hal_check_button_pressed**(void) | Used for breaking waiting in **platform_bmlite_receive()** if returns not 0 | | void **hal_set_leds**(platform_led_status_t status, uint16_t mode) | Set LED(s) state according to status and mode. | ------------