Esempio n. 1
0
void zg_init()
{
	intr_occured = 0;
	intr_valid = 0;
	lastRssi = 0;
	zg_drv_state = DRV_STATE_INIT;
	zg_conn_status = 0;
	tx_ready = 0;
	rx_ready = 0;
	cnf_pending = 0;
	zg_buf = uip_buf;
	zg_buf_len = UIP_BUFSIZE;

	zg_chip_reset();
	zg_interrupt2_reg();
	zg_interrupt_reg(0xff, 0);
	zg_interrupt_reg(0x80|0x40, 1);

	ssid_len = (U8)strlen(ssid);
}
Esempio n. 2
0
void zg_init()
{
	U8 clr;

	ZG2100_SpiInit();
	clr = SPSR;
	clr = SPDR;

	intr_occured = 0;
	intr_valid = 0;
	zg_drv_state = DRV_STATE_INIT;
	zg_conn_status = 0;
	tx_ready = 0;
	rx_ready = 0;
	cnf_pending = 0;
	zg_buf = uip_buf;
	zg_buf_len = UIP_BUFSIZE;

	zg_chip_reset();
	zg_interrupt2_reg();
	zg_interrupt_reg(0xff, 0);
	zg_interrupt_reg(0x80|0x40, 1);
}