| | |
| | | #include "board.h" |
| | | extern void (*Usart0ParseDataCallback)(uint8_t); |
| | | extern void Usart0ParseDataHandler(uint8_t data); |
| | | extern void Usart3ParseDataHandler(uint8_t data);//UART蓝牙数据分析处理 |
| | | struct UART_CFG_T test_uart_cfg = |
| | | { |
| | | .parity = UART_PARITY_NONE, |
| | |
| | | io_pin_mux_set(LORA_CLK, IO_FUNC2); |
| | | io_pin_mux_set(LORA_IRQ, IO_FUNC0); |
| | | io_pin_mux_set(LORA_NRST, IO_FUNC0); |
| | | // io_pull_set(IO_PIN_11, IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | // io_pull_set(IO_PIN_12, IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | // io_pull_set(IO_PIN_13, IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | //初始化lora引脚 |
| | | // UART0 TX/RX |
| | | io_pin_mux_set(IO_PIN_5, IO_FUNC4); |
| | |
| | | { |
| | | // io_pin_mux_set(_4G_USART_RX_Pin,IO_FUNC0);//把原先io 变为普通GPIO |
| | | gpio_pin_set_dir(LORA_IRQ , GPIO_DIR_IN, 0); |
| | | io_pull_set(LORA_IRQ, IO_PULL_DOWN, IO_PULL_UP_NONE);//此处中间参数修改过现在这个能少190ua左右电流 |
| | | io_pull_set(LORA_IRQ, IO_PULL_DOWN, IO_PULL_UP_LEVEL2);//此处中间参数修改过现在这个能少190ua左右电流 |
| | | gpio_enable_irq(LORA_IRQ, GPIO_IRQ_TYPE_RISING_EDGE, irq_handler); |
| | | } |
| | | void uart0_Init_normal(void) |