174 unsigned char bit = pin & 0xff;
220 unsigned char bit = pin & 0xff;
245 return p[pin>>8] & (pin & 0xff);
303 unsigned char bit = pin & 0xff;
319 unsigned char bit = pin & 0xff;
338 unsigned char bit = pin & 0xff;
354 unsigned char bit = pin & 0xff;
373 unsigned char bit = pin & 0xff;
391 unsigned char bit = pin & 0xff;
409 unsigned char bit = pin & 0xff;
Definition: gpio_8258.h:103
unsigned char analog_read(unsigned char addr)
This function serves to analog register read.
Definition: gpio_8258.h:98
Definition: gpio_8258.h:107
Definition: gpio_8258.h:58
static void gpio_set_output_en(GPIO_PinTypeDef pin, unsigned int value)
This function set the output function of a pin.
Definition: gpio_8258.h:172
void gpio_set_input_en(GPIO_PinTypeDef pin, unsigned int value)
This function set the input function of a pin.
Definition: gpio_8258.h:47
#define reg_gpio_in(i)
Definition: register_8258.h:676
Definition: gpio_8258.h:70
Definition: gpio_8258.h:106
#define BM_IS_SET(x, mask)
Definition: bsp.h:41
Definition: gpio_8258.h:121
Definition: gpio_8258.h:56
Definition: gpio_8258.h:147
Definition: gpio_8258.h:73
Definition: gpio_8258.h:51
Definition: gpio_8258.h:83
Definition: gpio_8258.h:137
Definition: gpio_8258.h:49
static int gpio_is_input_en(GPIO_PinTypeDef pin)
This function determines whether the input function of a pin is enabled.
Definition: gpio_8258.h:207
Definition: gpio_8258.h:69
Definition: gpio_8258.h:80
GPIO_PolTypeDef
Define rising/falling types.
Definition: gpio_8258.h:135
static void gpio_set_interrupt_risc0(GPIO_PinTypeDef pin, GPIO_PolTypeDef falling)
This function set a pin's IRQ.
Definition: gpio_8258.h:353
Definition: gpio_8258.h:52
#define reg_gpio_oen(i)
Definition: register_8258.h:678
static void usb_set_pin_en(void)
This function serves to set GPIO MUX function as DP and DM pin of USB.
Definition: gpio_8258.h:459
static void gpio_en_interrupt(GPIO_PinTypeDef pin, int en)
This function enables a pin's IRQ function.
Definition: gpio_8258.h:336
static void gpio_read_all(unsigned char *p)
This function read all the pins' input level.
Definition: gpio_8258.h:253
Definition: gpio_8258.h:102
static void gpio_write(GPIO_PinTypeDef pin, unsigned int value)
This function set the pin's output level.
Definition: gpio_8258.h:218
Definition: gpio_8258.h:51
#define BM_SET(x, mask)
Definition: bsp.h:39
Definition: gpio_8258.h:115
Definition: gpio_8258.h:68
Definition: gpio_8258.h:136
Definition: gpio_8258.h:118
void gpio_setup_up_down_resistor(GPIO_PinTypeDef gpio, GPIO_PullTypeDef up_down)
This function set a pin's pull-up/down resistor.
Definition: gpio_8258.h:66
Definition: gpio_8258.h:101
#define reg_gpio_irq_wakeup_en(i)
Definition: register_8258.h:686
Definition: gpio_8258.h:83
Definition: gpio_8258.h:67
void gpio_init(int anaRes_init_en)
This function servers to initialization all gpio.
#define BIT(n)
Definition: bsp.h:33
void gpio_shutdown(GPIO_PinTypeDef pin)
This function servers to set the specified GPIO as high resistor.
Definition: gpio_8258.h:82
Definition: gpio_8258.h:85
static unsigned int gpio_read(GPIO_PinTypeDef pin)
This function read the pin's input/output level.
Definition: gpio_8258.h:233
Definition: gpio_8258.h:84
Definition: gpio_8258.h:127
Definition: gpio_8258.h:99
static void usb_dp_pullup_en(int en)
This function enables or disables the internal pull-up resistor of DP pin of USB interface.
Definition: gpio_8258.h:424
#define reg_gpio_ie(i)
Definition: register_8258.h:677
Definition: gpio_8258.h:64
Definition: gpio_8258.h:108
Definition: gpio_8258.h:71
Definition: gpio_8258.h:53
#define REG_ADDR8(a)
Definition: bsp.h:102
Definition: register_8258.h:792
Definition: gpio_8258.h:136
Definition: gpio_8258.h:55
Definition: gpio_8258.h:62
Definition: gpio_8258.h:76
Definition: gpio_8258.h:111
#define reg_gpio_irq_risc0_en(i)
Definition: register_8258.h:688
Definition: gpio_8258.h:45
Definition: gpio_8258.h:146
Definition: gpio_8258.h:65
Definition: register_8258.h:796
Definition: gpio_8258.h:84
Definition: gpio_8258.h:50
static int gpio_is_output_en(GPIO_PinTypeDef pin)
This function determines whether the output function of a pin is enabled.
Definition: gpio_8258.h:196
Definition: gpio_8258.h:85
Definition: gpio_8258.h:75
Definition: gpio_8258.h:39
GPIO_PullTypeDef
Define pull up or down types.
Definition: gpio_8258.h:143
static void gpio_toggle(GPIO_PinTypeDef pin)
This function set the pin toggle.
Definition: gpio_8258.h:266
GPIO_PinTypeDef
Define GPIO types.
Definition: gpio_8258.h:38
Definition: gpio_8258.h:114
Definition: gpio_8258.h:119
Definition: gpio_8258.h:113
Definition: gpio_8258.h:145
Definition: gpio_8258.h:120
static void usb_power_on(unsigned char en)
This function serves to power on or down USB module.
Definition: gpio_8258.h:443
static void gpio_set_interrupt(GPIO_PinTypeDef pin, GPIO_PolTypeDef falling)
This function set a pin's IRQ.
Definition: gpio_8258.h:317
GPIO_FuncTypeDef
Define GPIO Function types.
Definition: gpio_8258.h:94
Definition: gpio_8258.h:126
void gpio_set_data_strength(GPIO_PinTypeDef pin, unsigned int value)
This function set the pin's driving strength.
Definition: gpio_8258.h:104
Definition: gpio_8258.h:110
Definition: gpio_8258.h:78
Definition: gpio_8258.h:97
Definition: gpio_8258.h:57
void analog_write(unsigned char addr, unsigned char v)
This function serves to analog register write.
Definition: gpio_8258.h:41
#define reg_gpio_irq_risc1_en(i)
Definition: register_8258.h:689
Definition: gpio_8258.h:117
#define reg_gpio_out(i)
Definition: register_8258.h:679
Definition: gpio_8258.h:100
#define reg_irq_mask
Definition: register_8258.h:767
Definition: gpio_8258.h:43
static void gpio_set_interrupt_pol(GPIO_PinTypeDef pin, GPIO_PolTypeDef falling)
This function set a pin's polarity that trig its IRQ.
Definition: gpio_8258.h:301
Definition: gpio_8258.h:112
Definition: register_8258.h:704
Definition: gpio_8258.h:137
Definition: gpio_8258.h:105
static void gpio_en_interrupt_risc0(GPIO_PinTypeDef pin, int en)
This function enables a pin's IRQ function.
Definition: gpio_8258.h:371
Definition: gpio_8258.h:87
static unsigned int gpio_read_cache(GPIO_PinTypeDef pin, unsigned char *p)
This function read a pin's cache from the buffer.
Definition: gpio_8258.h:243
Definition: gpio_8258.h:116
#define BM_CLR(x, mask)
Definition: bsp.h:40
Definition: gpio_8258.h:50
Definition: gpio_8258.h:40
Definition: gpio_8258.h:95
Definition: gpio_8258.h:82
Definition: gpio_8258.h:42
Definition: gpio_8258.h:59
Definition: gpio_8258.h:61
Definition: register_8258.h:795
Definition: gpio_8258.h:46
Definition: gpio_8258.h:77
Definition: gpio_8258.h:96
Definition: gpio_8258.h:48
GPIO_LevelTypeDef
Definition: gpio_8258.h:125
Definition: gpio_8258.h:144
#define reg_gpio_pol(i)
Definition: register_8258.h:680
static void gpio_en_interrupt_risc1(GPIO_PinTypeDef pin, int en)
This function enables a pin's IRQ function.
Definition: gpio_8258.h:407
void gpio_set_func(GPIO_PinTypeDef pin, GPIO_FuncTypeDef func)
This function servers to set the GPIO's function.
Definition: gpio_8258.h:74
#define reg_gpio_wakeup_irq
Definition: register_8258.h:701
static void gpio_set_interrupt_risc1(GPIO_PinTypeDef pin, GPIO_PolTypeDef falling)
This function set a pin's IRQ.
Definition: gpio_8258.h:389
Definition: gpio_8258.h:79
Definition: gpio_8258.h:60
Definition: gpio_8258.h:52