BLE_DCF_TYQ_CH592F/HAL/include/HAL.h

81 lines
2.0 KiB
C
Raw Permalink Normal View History

2024-12-02 16:26:55 +08:00
/********************************** (C) COPYRIGHT *******************************
* File Name : HAL.h
* Author : WCH
* Version : V1.0
* Date : 2016/05/05
* Description :
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
2025-04-12 13:58:43 +08:00
* Attention: This software (modified or not) and binary are used for
2024-12-02 16:26:55 +08:00
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
*******************************************************************************/
/******************************************************************************/
#ifndef __HAL_H
#define __HAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "CONFIG.h"
#include "RTC.h"
#include "SLEEP.h"
#include "LED.h"
#include "KEY.h"
/* hal task Event */
#define LED_BLINK_EVENT 0x0001
#define HAL_KEY_EVENT 0x0002
#define HAL_REG_INIT_EVENT 0x2000
#define HAL_TEST_EVENT 0x4000
/*********************************************************************
* GLOBAL VARIABLES
*/
extern tmosTaskID halTaskID;
/*********************************************************************
* GLOBAL FUNCTIONS
*/
/**
* @brief Ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
*/
extern void HAL_Init(void);
/**
* @brief Ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*
* @param task_id - The TMOS assigned task ID.
* @param events - events to process. This is a bit map and can
* contain more than one event.
*/
extern tmosEvents HAL_ProcessEvent(tmosTaskID task_id, tmosEvents events);
/**
* @brief BLE <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
*/
2025-02-21 14:38:41 +08:00
extern void CH58x_BLEInit(void);
2024-12-02 16:26:55 +08:00
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD>ڲ<EFBFBD><EFBFBD>¸в<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ADC<EFBFBD>жϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>.
*
* @return <EFBFBD>ڲ<EFBFBD><EFBFBD>¸в<EFBFBD><EFBFBD><EFBFBD>ֵ.
*/
extern uint16_t HAL_GetInterTempValue(void);
/**
* @brief <EFBFBD>ڲ<EFBFBD>32kУ׼
*/
extern void Lib_Calibration_LSI(void);
/*********************************************************************
*********************************************************************/
#ifdef __cplusplus
}
#endif
#endif