How to send an array of Hex data bytes by uart0 in nrf5340

Hi

I want to send an array of hex data bytes by uart0 in nrf5340 inside the program. I have studied the uart_peripheral sample. In this sample every thing has been set to 

perform automatically by ble call back routine. I need to send my data directly with out the Bluetooth  function. I have wrote down the following code:

struct uart_data_t *tx;
struct uart_data_t data[] = {0x1,0x2};
for (k=0;k<2;k++){
uart_tx(uart,tx->data,tx->len,SYS_FOREVER_MS);
}

but it didn't work. would you kindly please help me in this issue.

Best regards

Parents Reply Children
No Data
Related