mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
79 lines
1.8 KiB
C
79 lines
1.8 KiB
C
/********************************** (C) COPYRIGHT *******************************
|
||
* File Name : HAL.h
|
||
* Author : WCH
|
||
* Version : V1.0
|
||
* Date : 2016/05/05
|
||
* Description :
|
||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*******************************************************************************/
|
||
|
||
/******************************************************************************/
|
||
#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 Ӳ<><D3B2><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>
|
||
*/
|
||
extern void HAL_Init(void);
|
||
|
||
/**
|
||
* @brief Ӳ<><D3B2><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 <20><><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>
|
||
*/
|
||
extern void CH58X_BLEInit(void);
|
||
|
||
/**
|
||
* @brief <20><>ȡ<EFBFBD>ڲ<EFBFBD><DAB2>¸в<C2B8><D0B2><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD>ADC<44>жϲ<D0B6><CFB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ˺<DAB4><CBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>.
|
||
*
|
||
* @return <20>ڲ<EFBFBD><DAB2>¸в<C2B8><D0B2><EFBFBD>ֵ.
|
||
*/
|
||
extern uint16_t HAL_GetInterTempValue(void);
|
||
|
||
/**
|
||
* @brief <20>ڲ<EFBFBD>32kУ
|
||
*/
|
||
extern void Lib_Calibration_LSI(void);
|
||
|
||
/*********************************************************************
|
||
*********************************************************************/
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif
|