20 lines
417 B
C++
20 lines
417 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(const char *string);
|
|
|
|
#endif
|