📄 config.h
字号:
/*
Configuration shared between spp_master and spp_slave
*/
#ifndef SPP_CONFIG_H
#define SPP_CONFIG_H
#include <cm_rfcomm.h>
#ifdef CSR_APPLICATION_HARDWARE
#ifndef USE_HANDSHAKE
#error SPP dongle design requires the use of handshaking
#endif
#endif
/* PIO assignments */
#ifdef CSR_APPLICATION_HARDWARE
/* Assignments for dedicated hardware */
#define LED_CONNECT (1<<0)
#define LED_POWER (1<<1)
#define BUTTON (1<<6)
#define INVALID (1<<7)
#define BUTTON_DOWN(p) (((p) & BUTTON) == 0)
#else
/* Assignments for Casira */
#define LED_CONNECT (1<<7)
#define LED_POWER 0
#ifdef USE_HANDSHAKE
#define BUTTON (1<<4) /* Handshake wants to use 5 */
#else
#define BUTTON (1<<5)
#endif
#define INVALID 0
#define BUTTON_DOWN(p) (((p) & BUTTON) != 0)
#endif
/* Maximum allowed framesize */
#define MAX_FRAMESIZE 320
/* Connection manager is task zero */
#define CM 0
/* Use the first persistent store key for the address of the other device */
#define PSKEY_FAR_ADDR 0
/* Use the second persistent store key for the link key */
#define PSKEY_LINK_KEY 1
/*
We need to choose a class for this device. For now just use the
unassigned value with minor zero because nothing seems to fit
cable replacement very well.
*/
#define CLASS_OF_DEVICE 0x1F00
/* Fill in parts of CM_CONNECT messages */
void config_use(cm_auth_config_t *use);
void config_park(cm_park_config_t *park);
void config_sniff(cm_sniff_config_t *sniff);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -