-
Notifications
You must be signed in to change notification settings - Fork 3
/
cy_ble_stack_pvt.h
125 lines (103 loc) · 4.68 KB
/
cy_ble_stack_pvt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/**************************************************************************//**
* \file cy_ble_stack_pvt.h
* \version 3.60
*
* \brief
* Contains the function prototypes and constants for the HAL section.
*
* Note:
*
********************************************************************************
* \copyright
* Copyright 2017-2021, Cypress Semiconductor Corporation. All rights reserved.
* You may use this file only in accordance with the license, terms, conditions,
* disclaimers, and limitations in the end user license agreement accompanying
* the software package with which this file was provided.
*******************************************************************************/
#ifndef CY_BLE_CY_BLE_STACK_PVT_H
#define CY_BLE_CY_BLE_STACK_PVT_H
#include "cy_ble_stack.h"
#include "cy_sysclk.h"
#include "cy_syspm.h"
/* C binding of definitions if building with C++ compiler */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/***************************************
* Data Types
***************************************/
/**
* Structure containing the parameters required for IPC message from controller to Host
*/
typedef struct
{
/** ID of the message client*/
uint8_t clientID;
/** Type of message */
uint8_t pktType;
/** Message Interrupt Rel. Mask */
uint16_t intrRelMask;
/** Pointer to Data in message */
uint32_t pktDataPointer;
/** Meta Data of the message */
uint16_t pktMetaData;
}cy_stc_ble_ipc_ctrl_msg;
/***************************************
* Function Prototypes
***************************************/
cy_en_ble_api_result_t Cy_BLE_ControllerIpcHalSendEnqueue(cy_stc_ble_ipc_ctrl_msg* msg);
void Cy_BLE_LlIsrExitLowPowerMode(void);
/***************************************
* Stack manager prototypes
***************************************/
/* External definitions for BLE Stack ISR handler */
extern bool Cy_BLE_HAL_BlessInterruptHandler(void);
/* To be used only for HCI_MODE and in Debug mode
* where the logger serial port is enabled
*/
extern void Cy_BLE_HAL_UartTxCompltHandler(void);
/* To be used only for HCI_MODE */
extern void Cy_BLE_HAL_UartRxDataHandler(uint8_t byte);
/* To be used only for Host MODE */
extern void Cy_BLE_HAL_HciTransportHandler(char_t packet, uint16_t packet_len);
/* To be used only for Host UART/Soft HCI Mode */
extern void Cy_BLE_HAL_SoftControllerProcessEventsWrapper(void);
extern void Cy_BLE_HAL_ControllerEnablePrivacyFeatureWrapper(void);
extern void Cy_BLE_HAL_ControllerEnableDleFeatureWrapper(void);
extern void Cy_BLE_HAL_ControllerEnablePhyUpdateFeaturWrapper(void);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerSetFeatureConfigWrapper(const cy_stc_ble_stack_config_param_t *configParam,uint16_t *featureHeapReq);
extern cy_en_ble_lp_mode_t Cy_BLE_HAL_ControllerEnterLPMWrapper(cy_en_ble_lp_mode_t pwrMode);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerValidateInputParamsWrapper(const cy_stc_ble_stack_init_info_t *initParam);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerGetHeapMemoryWrapper(uint16_t *memorySize);
extern cy_en_ble_lp_mode_t Cy_BLE_HAL_ControllerExitLPMWrapper(void);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerInitWrapper(cy_stc_ble_stack_init_info_t *initParam);
extern void Cy_BLE_HAL_Pilo_InitCalibrationWrapper(void);
extern void Cy_BLE_HAL_Pilo_TriggerCalibrationWrapper(void);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerGetInternalHeapReqWrapper(uint16_t *memorySize);
extern cy_en_ble_api_result_t Cy_BLE_HAL_StackMgr_BleSSInitWrapper(uint8 persistRadioCal);
extern cy_en_ble_api_result_t Cy_BLE_HAL_ControllerResetWrapper(void);
extern void Cy_BLE_HAL_StackMgr_BleSSShutdownWrapper(void);
extern void Cy_BLE_HAL_Pilo_ShutdownCalibrationWrapper(void);
extern cy_stc_ble_stack_config_param_t* Cy_BLE_HAL_StackGetConfigPtrWrapper(void);
extern void * Cy_BLE_HAL_llf_task_start_routineWrapper(void * args);
extern void Cy_BLE_HAL_BT_timer_process_signalsWrapper(void *arg);
/***************************************
* Macros
***************************************/
#define CY_BLE_INTR_TX_SUCCESS 0x00u
#define CY_BLE_INTR_TX_DONE 0x00u
#define CY_BLE_INTR_TX_OVERFLOW 0x01u
#define CY_BLE_INTR_RX_SUCCESS 0x00u
#define CY_BLE_INTR_RX_NOT_EMPTY 0x00u
#define CY_BLE_INTR_RX_OVERFLOW 0x01u
#define CY_BLE_INTR_RX_FRAME_ERROR 0x02u
#define CY_BLE_INTR_RX_PARITY_ERROR 0x04u
/* Align buffer size value to 4 */
#define CY_BLE_STACK_ALIGN_TO_4(x) ((((x) & 3u) == 0u) ? \
(x) : \
(((x) - ((x) & 3u)) + 4u))
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CY_BLE_CY_BLE_STACK_PVT_H */
/* [] END OF FILE */