#include "fw_conf.h"
#include "fw_types.h"
Go to the source code of this file.
|
| #define | GPIO_P0_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P1_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P2_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P3_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P4_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P5_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P6_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_P7_SetMode(__PINS__, __MODE__) |
| |
| #define | GPIO_SetPullUp(__PORT__, __PINS__, __STATE__) |
| |
| #define | GPIO_SetSchmittTrigger(__PORT__, __PINS__, __STATE__) |
| |
| #define | GPIO_SetSwitchSpeed(__PORT__, __PINS__, __STATE__) |
| |
| #define | GPIO_SetDriveCapability(__PORT__, __PINS__, __STATE__) |
| |
| #define | GPIO_SetDigitalInput(__PORT__, __PINS__, __STATE__) |
| |
|
| enum | GPIO_Mode_t { GPIO_Mode_InOut_QBD = 0x00
, GPIO_Mode_Output_PP = 0x01
, GPIO_Mode_Input_HIP = 0x02
, GPIO_Mode_InOut_OD = 0x03
} |
| |
| enum | GPIO_Port_t {
GPIO_Port_0 = 0U
, GPIO_Port_1 = 1U
, GPIO_Port_2 = 2U
, GPIO_Port_3 = 3U
,
GPIO_Port_4 = 4U
, GPIO_Port_5 = 5U
, GPIO_Port_6 = 6U
, GPIO_Port_7 = 7U
} |
| |
| enum | GPIO_Pin_t {
GPIO_Pin_0 = B00000001
, GPIO_Pin_1 = B00000010
, GPIO_Pin_2 = B00000100
, GPIO_Pin_3 = B00001000
,
GPIO_Pin_4 = B00010000
, GPIO_Pin_5 = B00100000
, GPIO_Pin_6 = B01000000
, GPIO_Pin_7 = B10000000
,
GPIO_Pin_All = B11111111
} |
| |
| enum | GPIO_SchmittTrigger_t { GPIO_SchmittTrigger_ON = 0x00
, GPIO_SchmittTrigger_OFF = 0x01
} |
| |
| enum | GPIO_SwitchSpeed_t { GPIO_SwitchSpeed_High = 0x00
, GPIO_SwitchSpeed_Low = 0x01
} |
| |
| enum | GPIO_DriveCapability_t { GPIO_DriveCapability_High = 0x00
, GPIO_DriveCapability_Normal = 0x01
} |
| |
◆ GPIO_P0_SetMode
| #define GPIO_P0_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P0M0 = P0M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P0M1 = P0M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 74 of file fw_gpio.h.
◆ GPIO_P1_SetMode
| #define GPIO_P1_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P1M0 = P1M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P1M1 = P1M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 79 of file fw_gpio.h.
◆ GPIO_P2_SetMode
| #define GPIO_P2_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P2M0 = P2M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P2M1 = P2M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 84 of file fw_gpio.h.
◆ GPIO_P3_SetMode
| #define GPIO_P3_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P3M0 = P3M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P3M1 = P3M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 89 of file fw_gpio.h.
◆ GPIO_P4_SetMode
| #define GPIO_P4_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P4M0 = P4M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P4M1 = P4M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 94 of file fw_gpio.h.
◆ GPIO_P5_SetMode
| #define GPIO_P5_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P5M0 = P5M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P5M1 = P5M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 99 of file fw_gpio.h.
◆ GPIO_P6_SetMode
| #define GPIO_P6_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P6M0 = P6M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P6M1 = P6M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 105 of file fw_gpio.h.
◆ GPIO_P7_SetMode
| #define GPIO_P7_SetMode |
( |
|
__PINS__, |
|
|
|
__MODE__ |
|
) |
| |
Value: do { \
P7M0 = P7M0 & ~(__PINS__) | (((__MODE__) & 0x01)? (__PINS__) : 0x00); \
P7M1 = P7M1 & ~(__PINS__) | (((__MODE__) & 0x02)? (__PINS__) : 0x00); \
} while(0)
Definition at line 110 of file fw_gpio.h.
◆ GPIO_SetDigitalInput
| #define GPIO_SetDigitalInput |
( |
|
__PORT__, |
|
|
|
__PINS__, |
|
|
|
__STATE__ |
|
) |
| |
Value: do { \
SFRX_ON(); \
SFRX(
PxIE + (__PORT__)) = SFRX(
PxIE + (__PORT__)) \
& ~(__PINS__) | (((__STATE__) & 0x01)? (__PINS__) : 0x00); \
SFRX_OFF(); \
} while(0)
Definition at line 144 of file fw_gpio.h.
◆ GPIO_SetDriveCapability
| #define GPIO_SetDriveCapability |
( |
|
__PORT__, |
|
|
|
__PINS__, |
|
|
|
__STATE__ |
|
) |
| |
Value: do { \
SFRX_ON(); \
SFRX(
PxDR + (__PORT__)) = SFRX(
PxDR + (__PORT__)) \
& ~(__PINS__) | (((__STATE__) & 0x01)? (__PINS__) : 0x00); \
SFRX_OFF(); \
} while(0)
Definition at line 137 of file fw_gpio.h.
◆ GPIO_SetPullUp
| #define GPIO_SetPullUp |
( |
|
__PORT__, |
|
|
|
__PINS__, |
|
|
|
__STATE__ |
|
) |
| |
Value: do { \
SFRX_ON(); \
SFRX(
PxPU + (__PORT__)) = SFRX(
PxPU + (__PORT__)) \
& ~(__PINS__) | (((__STATE__) & 0x01)? (__PINS__) : 0x00); \
SFRX_OFF(); \
} while(0)
Definition at line 116 of file fw_gpio.h.
◆ GPIO_SetSchmittTrigger
| #define GPIO_SetSchmittTrigger |
( |
|
__PORT__, |
|
|
|
__PINS__, |
|
|
|
__STATE__ |
|
) |
| |
Value: do { \
SFRX_ON(); \
SFRX(
PxNCS + (__PORT__)) = SFRX(
PxNCS + (__PORT__)) \
& ~(__PINS__) | (((__STATE__) & 0x01)? (__PINS__) : 0x00); \
SFRX_OFF(); \
} while(0)
Definition at line 123 of file fw_gpio.h.
◆ GPIO_SetSwitchSpeed
| #define GPIO_SetSwitchSpeed |
( |
|
__PORT__, |
|
|
|
__PINS__, |
|
|
|
__STATE__ |
|
) |
| |
Value: do { \
SFRX_ON(); \
SFRX(
PxSR + (__PORT__)) = SFRX(
PxSR + (__PORT__)) \
& ~(__PINS__) | (((__STATE__) & 0x01)? (__PINS__) : 0x00); \
SFRX_OFF(); \
} while(0)
Definition at line 130 of file fw_gpio.h.
◆ GPIO_DriveCapability_t
| Enumerator |
|---|
| GPIO_DriveCapability_High | |
| GPIO_DriveCapability_Normal | |
Definition at line 68 of file fw_gpio.h.
69{
@ GPIO_DriveCapability_Normal
@ GPIO_DriveCapability_High
◆ GPIO_Mode_t
| Enumerator |
|---|
| GPIO_Mode_InOut_QBD | |
| GPIO_Mode_Output_PP | |
| GPIO_Mode_Input_HIP | |
| GPIO_Mode_InOut_OD | |
Definition at line 21 of file fw_gpio.h.
◆ GPIO_Pin_t
| Enumerator |
|---|
| GPIO_Pin_0 | |
| GPIO_Pin_1 | |
| GPIO_Pin_2 | |
| GPIO_Pin_3 | |
| GPIO_Pin_4 | |
| GPIO_Pin_5 | |
| GPIO_Pin_6 | |
| GPIO_Pin_7 | |
| GPIO_Pin_All | |
Definition at line 43 of file fw_gpio.h.
◆ GPIO_Port_t
| Enumerator |
|---|
| GPIO_Port_0 | |
| GPIO_Port_1 | |
| GPIO_Port_2 | |
| GPIO_Port_3 | |
| GPIO_Port_4 | |
| GPIO_Port_5 | |
| GPIO_Port_6 | |
| GPIO_Port_7 | |
Definition at line 29 of file fw_gpio.h.
30{
37#if (__CONF_MCU_TYPE == 1 ) || (__CONF_MCU_TYPE == 3 )
40#endif
◆ GPIO_SchmittTrigger_t
| Enumerator |
|---|
| GPIO_SchmittTrigger_ON | |
| GPIO_SchmittTrigger_OFF | |
Definition at line 56 of file fw_gpio.h.
57{
@ GPIO_SchmittTrigger_OFF
◆ GPIO_SwitchSpeed_t
| Enumerator |
|---|
| GPIO_SwitchSpeed_High | |
| GPIO_SwitchSpeed_Low | |
Definition at line 62 of file fw_gpio.h.