Exemple #1
0
//------------------------------------------------------------------------------
// Function Name  : gpio_get()
// Description    :
//------------------------------------------------------------------------------
void gpio_clr(u32 _port, u32 _pin)
{
	volatile u32 *reg = gpio_data_reg(_port);
	u32 data = PIN_BIT(_pin);
	
	*reg &= ~data;
}
Exemple #2
0
//------------------------------------------------------------------------------
// Function Name  : gpio_set()
// Description    :
//------------------------------------------------------------------------------
void gpio_set(u32 _port, u32 _pin)
{
	volatile u32 *reg = gpio_data_reg(_port);

	*reg |= PIN_BIT(_pin);
}
Exemple #3
0
static int m6tv_pin_map_to_direction(unsigned int pin, unsigned int *reg, unsigned int *bit)
{
	*reg = PIN_REG(m6tv_pin_map[pin]);
	*bit = PIN_BIT(m6tv_pin_map[pin]);
	return 0;
}