84 lines
1.7 KiB
C
84 lines
1.7 KiB
C
/**
|
||
******************************************************************************
|
||
* @file board.h
|
||
* @author SRG
|
||
* @version V1.0.0
|
||
* @date 2020-03-17
|
||
* @brief
|
||
******************************************************************************
|
||
* @attention
|
||
*
|
||
* <h2><center>© Copyright (c) 2020 FudanMicroelectronics.
|
||
* All rights reserved.</center></h2>
|
||
*
|
||
******************************************************************************
|
||
*/
|
||
|
||
#ifndef __BOARD_H_
|
||
#define __BOARD_H_
|
||
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
|
||
//#include "fm15l0xx.h"
|
||
|
||
|
||
|
||
//typedef enum
|
||
//{
|
||
// Mode_In_Up = 0, //高速,pullup
|
||
// Mode_In_No, //高速,nopull
|
||
// Mode_In_Down, //高速,pulldown
|
||
// Mode_Out_Up, //高速,推挽,pullup
|
||
// Mode_Out_No, //高速,推挽,nopull
|
||
// Mode_Out_Down, //高速,推挽,pulldown
|
||
//} eGPIOMode;
|
||
|
||
|
||
//HMI LED
|
||
|
||
|
||
#define LED1_PIN LL_GPIO_Pin3 //PC3
|
||
#define LED2_PIN LL_GPIO_Pin4 //PC4
|
||
#define LED_GPIO GPIOC
|
||
|
||
|
||
|
||
|
||
|
||
#define LED1_On LL_GPIO_SetOutputPin( LED_GPIO, LED1_PIN )
|
||
#define LED1_Off LL_GPIO_ResetOutputPin( LED_GPIO, LED1_PIN )
|
||
|
||
#define LED2_On LL_GPIO_SetOutputPin( LED_GPIO, LED2_PIN )
|
||
#define LED2_Off LL_GPIO_ResetOutputPin( LED_GPIO, LED2_PIN )
|
||
|
||
|
||
|
||
|
||
#define TEST_ADC_CH LL_ADC_CHANNEL_1
|
||
|
||
uint8_t UserKey_GetData( void );
|
||
|
||
void GPIO_NVIC_Init( void );
|
||
|
||
void Set_Clk(unsigned char mode);
|
||
void SVD_Init( void );
|
||
void BSP_Init( void );
|
||
|
||
uint16_t Get_Adc_Average( uint32_t ch, uint32_t ch_in, uint8_t cnt );
|
||
|
||
void LowPower_test( void );
|
||
|
||
void MCU_EnterLowerPowerMode( void );
|
||
|
||
void Set_Output(unsigned char mode);
|
||
void Set_Pwm(unsigned char mode);
|
||
void Set_FM440_Power(unsigned char mode);
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
#endif
|