ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_communication_uart_test.h
Go to the documentation of this file.
1 #ifndef RUUVI_INTERFACE_COMMUNICATION_UART_TEST_H
2 #define RUUVI_INTERFACE_COMMUNICATION_UART_TEST_H
3 #include "ruuvi_driver_error.h"
6 #include <stdbool.h>
7 
8 #define TEST_TIMEOUT_MS (100U)
9 
22 /*
23  * @brief Run UART integration tests.
24  *
25  * Writing and reading requires external GPIO IO connection to test sending and receiving data
26  * via UART. HWFC is not tested.
27  *
28  * @param[in] printfp Function pointer to which test JSON is sent.
29  * @param[in] input Pin used as RXD.
30  * @param[in] output Pin used as TXD.
31  * @retval true if error occured in test.
32  * @retval false if no errors occured.
33  */
35  const ri_gpio_id_t input, const ri_gpio_id_t output);
37 #endif
bool ri_communication_uart_run_integration_test(const rd_test_print_fp printfp, const ri_gpio_id_t input, const ri_gpio_id_t output)
void(* rd_test_print_fp)(const char *const msg)
function pointer to print test information
Ruuvi error codes and error check function.
uint16_t ri_gpio_id_t
port<<8 + pin