41 lines
1.5 KiB
C
41 lines
1.5 KiB
C
/*
|
|
*********************************************************************************************************
|
|
* IAR Development Kits
|
|
* on the
|
|
*
|
|
* M451
|
|
*
|
|
* Filename : gpio_vcc.h
|
|
* Version : V1.00
|
|
* Programmer(s) : Qian Xianghong
|
|
*********************************************************************************************************
|
|
*/
|
|
|
|
#include "type.h"
|
|
|
|
#ifndef USER_GPIO_VCC_PRESENT
|
|
#define USER_GPIO_VCC_PRESENT
|
|
|
|
#define VCC_GSM_ON() LL_GPIO_SetOutputPin(GPIOC, LL_GPIO_PIN_7)
|
|
#define VCC_GSM_OFF() LL_GPIO_ResetOutputPin(GPIOC, LL_GPIO_PIN_7)
|
|
|
|
#define VCC_GPS_ON() LL_GPIO_ResetOutputPin(GPIOC, LL_GPIO_PIN_8) // 低电平打开
|
|
#define VCC_GPS_OFF() LL_GPIO_SetOutputPin(GPIOC, LL_GPIO_PIN_8)
|
|
#define IS_VCC_GPS_ON() (!LL_GPIO_IsOutputPinSet(GPIOC, GPIO_PIN_8))
|
|
|
|
// RF模块开关
|
|
#define VCC_RF_ON() LL_GPIO_SetOutputPin(GPIOD, LL_GPIO_PIN_6)
|
|
#define VCC_RF_OFF() LL_GPIO_ResetOutputPin(GPIOD, LL_GPIO_PIN_6)
|
|
|
|
// 网络模块开关
|
|
#define VCC_ETHERNET_ON() LL_GPIO_SetOutputPin(GPIOC, LL_GPIO_PIN_12)
|
|
#define VCC_ETHERNET_OFF() LL_GPIO_ResetOutputPin(GPIOC, LL_GPIO_PIN_12)
|
|
#define IS_VCC_ETHERNET_ON() (LL_GPIO_IsOutputPinSet(GPIOC, GPIO_PIN_12))
|
|
|
|
// 声光报警输出开关
|
|
#define KZ_ALARM_ON() LL_GPIO_SetOutputPin(GPIOD, LL_GPIO_PIN_12)
|
|
#define KZ_ALARM_OFF() LL_GPIO_ResetOutputPin(GPIOD, LL_GPIO_PIN_12)
|
|
#define IS_ALARM_ON() (LL_GPIO_IsOutputPinSet(GPIOD, LL_GPIO_PIN_12))
|
|
|
|
#endif
|