52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/*
|
|
*********************************************************************************************************
|
|
* IAR Development Kits
|
|
* on the
|
|
*
|
|
* M451
|
|
*
|
|
* Filename : gpio_vcc.h
|
|
* Version : V1.00
|
|
* Programmer(s) : Qian Xianghong
|
|
*********************************************************************************************************
|
|
*/
|
|
|
|
#ifndef USER_GPIO_VCC_PRESENT
|
|
#define USER_GPIO_VCC_PRESENT
|
|
|
|
#define VCC_GSM_ON() PE5 = 1
|
|
#define VCC_GSM_OFF() PE5 = 0
|
|
|
|
#define VCC_GPS_ON() PE6 = 0 // 低电平打开
|
|
#define VCC_GPS_OFF() PE6 = 1
|
|
#define IS_VCC_GPS_ON() (PE6 == 0)
|
|
|
|
// RF模块开关
|
|
#define VCC_RF_ON() PC13 = 1
|
|
#define VCC_RF_OFF() PC13 = 0
|
|
|
|
// BD模块开关
|
|
#define VCC_BD_ON() // PB9 = 1 // 氢压力版本,这个脚被改作按键发送
|
|
#define VCC_BD_OFF() // PB9 = 0
|
|
|
|
// 传感器5V开关
|
|
#define VCC_SENSOR_5V_ON() PA7 = 1
|
|
#define VCC_SENSOR_5V_OFF() PA7 = 0
|
|
|
|
// 充电检测及唤醒脚
|
|
#define VCC_POWER_STATUS() (PC6)
|
|
|
|
// SFlash、FRAM开关
|
|
#define VCC_SFLASH_FRAM_ON() PC12 = 0 // 低电平打开
|
|
#define VCC_SFLASH_FRAM_OFF() PC12 = 1
|
|
|
|
void Vcc_Init();
|
|
void Vcc_Disable();
|
|
|
|
// 恢复通信引脚输出
|
|
void Vcc_Enable();
|
|
|
|
extern volatile uint8_t LCD_Disabled;
|
|
|
|
#endif
|