| | |
| | | |
| | | #define BUTTON_SWITCH_POWER_MODE_EN 1 |
| | | #define CH_NUM 5 |
| | | #define TX_POWER_LEVEL 60 |
| | | #define TX_POWER_LEVEL 55 |
| | | |
| | | static struct UWB_CONFIG_T uwb_config; |
| | | |
| | |
| | | |
| | | gpio_open(); |
| | | //PA引脚 |
| | | // io_pin_mux_set(IO_PIN_9, IO_FUNC0); |
| | | // io_pin_mux_set(IO_PIN_10, IO_FUNC0); |
| | | // gpio_pin_set_dir(IO_PIN_9, GPIO_DIR_OUT, 0); |
| | | // io_pull_set(IO_PIN_9, IO_PULL_DOWN, IO_PULL_UP_LEVEL4); |
| | | io_pin_mux_set(IO_PIN_9, IO_FUNC0); |
| | | io_pin_mux_set(IO_PIN_10, IO_FUNC0); |
| | | gpio_pin_set_dir(IO_PIN_9, GPIO_DIR_OUT, 0); |
| | | io_pull_set(IO_PIN_9, IO_PULL_DOWN, IO_PULL_UP_LEVEL4); |
| | | // gpio_pin_set_dir(IO_PIN_10, GPIO_DIR_OUT, 0); |
| | | // io_pull_set(IO_PIN_10, IO_PULL_DOWN, IO_PULL_UP_LEVEL4); |
| | | board_led_init(); |
| | | board_configure(); |
| | | |
| | |
| | | case TEST_UWB_TX: |
| | | delay_us(65535); |
| | | |
| | | // gpio_pin_set(IO_PIN_9);//测试; |
| | | // gpio_pin_clr(IO_PIN_10);//测试; |
| | | gpio_pin_set(IO_PIN_9);//测试; |
| | | gpio_pin_clr(IO_PIN_10);//测试; |
| | | uwb_blocking_tx_start(tx_payload, tx_len, 0); |
| | | // gpio_pin_clr(IO_PIN_9);//测试; |
| | | // gpio_pin_clr(IO_PIN_10);//测试; |
| | | gpio_pin_clr(IO_PIN_9);//测试; |
| | | gpio_pin_clr(IO_PIN_10);//测试; |
| | | break; |
| | | case TEST_UWB_RX: |
| | | // gpio_pin_clr(IO_PIN_10);//测试; |
| | | // gpio_pin_clr(IO_PIN_9);//测试; |
| | | uwb_blocking_rx_start(0, NULL); |
| | | // gpio_pin_clr(IO_PIN_9);//测试; |
| | | // gpio_pin_clr(IO_PIN_10);//测试; |
| | | uwb_close(); |
| | | break; |
| | | case TEST_MCU_SLEEP: |