nrf2401.h
来自「arduino ide nRF24l01 已调通」· C头文件 代码 · 共 38 行
H
38 行
#ifndef NRF2401_h
#define NRF2401_h
#include "API.h"
//*********************************************
#define SPI_PORT PORTB
#define SPI_DIR DDRB
#define SPI_IN PINB
//---------------------------------------------
#define KEY_PORT PORTC
#define KEY_DIR DDRC
#define KEY_IN PINC
//---------------------------------------------
#define LED_PORT PORTC
#define LED_DIR DDRC
#define LED_IN PINC
//---------------------------------------------
#define TX_ADR_WIDTH 5
// 5 unsigned chars TX(RX) address width
#define TX_PLOAD_WIDTH 20
// 20 unsigned chars TX payload
//---------------------------------------------
#define CE 0x20
// CE_BIT: Digital Input Chip Enable Activates RX or TX mode
#define SCK 0x10
// SCK BIT: Digital Input SPI Clock
#define MISO 0x08
// MISO BIT: Digital Output SPI Slave Data Output, with tri-state option
#define CSN 0x04
// CSN BIT: Digital Input SPI Chip Select
#define MOSI 0x02
// MOSI BIT: Digital Input SPI Slave Data Input
#define IRQ 0x01
// IRQ BIT: Digital Output Maskable interrupt pin
//*********************************************
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?