Browse Source

update

3lead_uart_test_ok_version
zhaohe 1 year ago
parent
commit
b0305a1be3
  1. 49
      app/src/one_conduction/one_conduction_main.c

49
app/src/one_conduction/one_conduction_main.c

@ -21,30 +21,33 @@ void zdatachannel_data_handler(zdatachannel_evt_t* p_evt) {
ZLOGI("rx:%s", hex2str(p_evt->params.rx_data.p_data, p_evt->params.rx_data.length));
}
}
#define PI 3.14159265
#define SAMPLES 100
#define AMPLITUDE 50
static void test_tx_timer_cb(void* p_context) {
// sample_data_mgr_init();
// static sample_data_filename_t filename = {0x00, 0x02, 0x03, 0x04, 0x05};
// static uint8_t wd[256];
// static uint8_t rdcache[256];
// for (size_t i = 0; i < 256; i++) wd[i] = i;
// int fd = sample_data_mgr_open(&filename, kwrflag_write_only);
// for (size_t i = 0; i < 10; i++) {
// sample_data_mgr_write(fd, wd, 256);
// }
// sample_data_mgr_close(fd);
// fd = sample_data_mgr_open(&filename, kwrflag_read_only);
// for (size_t i = 0; i < 10; i++) {
// sample_data_mgr_read(fd, rdcache, 256);
// NRF_LOG_HEXDUMP_INFO(rdcache, 256);
// }
// sample_data_mgr_dump_fileinfo_list();
// sample_data_mgr_uninit();
#if 0
/*******************************************************************************
* EEPROMÁд²âÊÔ *
*******************************************************************************/
sample_data_mgr_init();
static sample_data_filename_t filename = {0x00, 0x02, 0x03, 0x04, 0x05};
static uint8_t wd[256];
static uint8_t rdcache[256];
int fd = sample_data_mgr_open(&filename, kwrflag_write_only);
for (size_t i = 0; i < 10; i++) {
for (size_t j = 0; j < 256; j++) wd[j] = j + i;
sample_data_mgr_write(fd, wd, 256);
}
sample_data_mgr_close(fd);
fd = sample_data_mgr_open(&filename, kwrflag_read_only);
for (size_t i = 0; i < 10; i++) {
sample_data_mgr_read(fd, rdcache, 256);
NRF_LOG_HEXDUMP_INFO(rdcache, 256);
}
sample_data_mgr_dump_fileinfo_list();
sample_data_mgr_uninit();
#endif
}
extern uint32_t g_nrf_log_tx_pin;

Loading…
Cancel
Save