1:
9:
10:
14:
15:
#ifndef _GPIOPRM_H_
16:
#define _GPIOPRM_H_
17:
18:
19:
#include <stdint.h>
20:
#include "lib_common/AG903_common.h"
21:
22:
#ifdef __cplusplus
23:
extern "C" {
24:
#endif
25:
26:
27:
#define AG903_GPIO_CH_NUM (4)
28:
29:
30:
#define AG903_GPIO_PORTBIT_NUM (32)
31:
32:
33:
#define AG903_GPIO_PORTBIT_TORTAL (
AG903_GPIO_CH_NUM*
AG903_GPIO_PORTBIT_NUM)
34:
35:
36:
#define AG903_GPIO_PORTBLK_TORTAL (
AG903_GPIO_PORTBIT_TORTAL/8)
37:
38:
39:
void AG903_GPIOPrmSetByteData(uint8_t ch, uint8_t offset, uint8_t data);
40:
void AG903_GPIOPrmGetByteData(uint8_t ch, uint8_t offset, uint8_t* data);
41:
void AG903_GPIOPrmModifyBit(uint8_t ch, uint32_t set, uint32_t clr, _Bool ext);
42:
void AG903_GPIOPrmGetPortData(uint8_t ch, uint32_t* data);
43:
void AG903_GPIOPrmSetDirection(uint8_t ch, uint32_t dir);
44:
void AG903_GPIOPrmGetDirection(uint8_t ch, uint32_t* dir);
45:
void AG903_GPIOPrmSetType(uint8_t ch, uint32_t type);
46:
void AG903_GPIOPrmGetType(uint8_t ch, uint32_t* type);
47:
void AG903_GPIOPrmSetPosEdgeDetect(uint8_t ch, uint32_t enable);
48:
void AG903_GPIOPrmGetPosEdgeDetect(uint8_t ch, uint32_t* enable);
49:
void AG903_GPIOPrmSetNegEdgeDetect(uint8_t ch, uint32_t enable);
50:
void AG903_GPIOPrmGetNegEdgeDetect(uint8_t ch, uint32_t* enable);
51:
void AG903_GPIOPrmSetMask(uint8_t ch, uint32_t mask);
52:
void AG903_GPIOPrmGetMask(uint8_t ch, uint32_t* mask);
53:
void AG903_GPIOPrmGetEdgeDetect(uint8_t ch, uint32_t* status);
54:
void AG903_GPIOPrmClearEdgeDetect(uint8_t ch, uint32_t clrbit);
55:
56:
57:
#ifdef __cplusplus
58: }
59:
#endif
60:
#endif