Exemplo n.º 1
0
int msp_gpio_pin_mode(int mode, int pin)
{
	if ( pin==19 ) { //pin C3
		rtlRegMask( SHAREPIN_REGISTER_2, (1<<22) | (1<<23), (1<<22) | (1<<23));
	}
	rtlRegMask( GPABCDCNR, 1<<pin, 1<<pin);
	rtlRegMask( GPABCDDIR, 1<<pin, mode<<pin);
	
	return 0;
}
Exemplo n.º 2
0
static int __init alc5628_init(void)
{
	int ret;
	rtlRegMask(0xb8000010, 0x03DCB000, 0x01DCB000);//enable iis controller clock
	rtlRegMask(0xb8000058, 0x00000001, 0x00000001);//enable 24p576mHz clock

	/* Configure the I2S pins in correct mode */
#if 1 // set the jtag as iis-audio
	rtlRegMask(0xb8000040, 0x00000007, 0x00000003);//change pin mux to iis-voice pin
#else // set the led-phase or lec-sig as iis-audio
	rtlRegMask(0xb8000044, 0x001F80DB, 0x00000049);//change pin mux to iis-voice pin
#endif

	alc5628_init_i2c();

	return 0;
}
Exemplo n.º 3
0
int msp_gpio_pin_hi(int pin)
{
	rtlRegMask( GPABCDDATA, 1<<pin, 1<<pin);
	return 0;
}