Danger-alarm/SOFTWARE-FreeRTOS/Source/HC-12.hpp

20 lines
411 B
C++
Raw Normal View History

2024-06-03 16:27:41 +08:00
#ifndef HC_12_H
#define HC_12_H
#include "pico/stdlib.h"
#include "hardware/pio.h"
#include "uart_tx.pio.h"
#include "uart_rx.pio.h"
#define HC_12_PIO pio1
2024-06-04 09:54:09 +08:00
#define HC_12_PIO_TX_PIN 16 // 接 HC-12 RX
#define HC_12_PIO_RX_PIN 15 // 接 HC-12 TX
2024-06-03 16:27:41 +08:00
#define HC_12_PIO_SM_TX 0
#define HC_12_PIO_SM_RX 1
#define HC_12_PIO_SERIAL_BAUD 9600
extern void _HC_12_INIT();
2024-06-07 00:10:17 +08:00
extern void _HC_12(char *string);
2024-06-03 16:27:41 +08:00
#endif