Esempio n. 1
0
static void init_control_pins(void) {
	/*configure control pins*/
	REG_STORE(AT91C_PIOA_PPUDR, CONFIG_NXT_BT_CMD_PIN);
	pin_config_output(CONFIG_NXT_BT_CS_PIN | CONFIG_NXT_BT_RST_PIN | CONFIG_NXT_BT_CMD_PIN);
	pin_set_output(CONFIG_NXT_BT_CS_PIN | CONFIG_NXT_BT_RST_PIN);
	pin_clear_output(CONFIG_NXT_BT_CMD_PIN);

}
Esempio n. 2
0
void bluetooth_hw_hard_reset(void) {
	pin_config_output(BTM_BT_RST_PIN);
	pin_set_output(BTM_BT_RST_PIN);
	ksleep(1000);

	pin_clear_output(BTM_BT_RST_PIN);
	ksleep(5000);

	pin_config_input(BTM_BT_LINK_PIN);
	REG_STORE(AT91C_PIOA_PPUER, BTM_BT_LINK_PIN);
	REG_STORE(AT91C_PIOA_MDDR, BTM_BT_LINK_PIN);
}
Esempio n. 3
0
void bluetooth_hw_soft_reset(void) {
	pin_clear_output(CMD_PIN);
}
Esempio n. 4
0
void bluetooth_hw_hard_reset(void) {
	pin_clear_output(RST_PIN);
	ksleep(2000);
	pin_set_output(RST_PIN);
}
Esempio n. 5
0
static void led1_on(void) {
	pin_clear_output(OLIMEX_SAM7_LED1);
}