Danger-alarm/SOFTWARE-FreeRTOS/Source/HC-12.hpp
2024-06-07 00:10:17 +08:00

20 lines
411 B
C++

#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
#define HC_12_PIO_TX_PIN 16 // 接 HC-12 RX
#define HC_12_PIO_RX_PIN 15 // 接 HC-12 TX
#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();
extern void _HC_12(char *string);
#endif