80 lines
2.4 KiB
C
80 lines
2.4 KiB
C
/*!
|
|
* \file main.h
|
|
*
|
|
* \brief The head file of main.c
|
|
*
|
|
* \copyright Revised BSD License, see section \ref LICENSE.
|
|
*
|
|
* \code
|
|
*
|
|
* _ __ _ ________ _
|
|
* | |/ /(_)___ / ____/ /_ (_)___
|
|
* | // / __ \/ / / __ \/ / __ \
|
|
* / |/ / / / / /___/ / / / / /_/ /
|
|
* /_/|_/_/_/ /_/\____/_/ /_/_/ .___/
|
|
* /_/
|
|
* (C) 2022-2025 XinChip
|
|
*
|
|
* \endcode
|
|
*
|
|
* \author ( XinChip ) Alex-J
|
|
*
|
|
* \author ( XinChip )
|
|
*/
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef __MAIN_H__
|
|
#define __MAIN_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*-----------------------------------------------------------------------------------
|
|
INCLUDE HEADE FILES
|
|
------------------------------------------------------------------------------------*/
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "xc6xxx.h"
|
|
#include "clock.h"
|
|
#include "rf_adv_config.h"
|
|
/*------------------------------------------------------------------------------------
|
|
Macros
|
|
-------------------------------------------------------------------------------------*/
|
|
#define DEBUG_LOG
|
|
#define TEST_DATA
|
|
|
|
#define RF_ADV_BASE 2400U
|
|
#define RF_ADV_CHANNEL_37 2
|
|
#define RF_ADV_CHANNEL_38 26
|
|
#define RF_ADV_CHANNEL_39 80
|
|
|
|
#define ADV_BUFF_LEN XINCX_ADV_PIPE0_LEN
|
|
/*------------------------------------------------------------------------------------
|
|
TypeDef
|
|
-------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------------
|
|
Global Variables
|
|
-------------------------------------------------------------------------------------*/
|
|
extern uint8_t recv_len;
|
|
extern uint8_t recv_adv_buf[ADV_BUFF_LEN];
|
|
extern bool rf24g_handler_flag;
|
|
/*------------------------------------------------------------------------------------
|
|
Exported Functions
|
|
-------------------------------------------------------------------------------------*/
|
|
|
|
void rf_adv_tx_evevt(void);
|
|
void rf_adv_rx_evevt(void);
|
|
void rf_2_4g_dump_log(void);
|
|
void rf_2M_config(void);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H__ */
|
|
|