Esempio n. 1
0
void NanodeUIP::init(const byte *macaddr) {
  const struct uip_eth_addr *mac=(struct uip_eth_addr *)macaddr;

  uip_setethaddr((*mac));
  enc28j60SpiInit();
  enc28j60InitWithCs(macaddr, 8);
  enc28j60clkout(2); // change clkout from 6.25MHz to 12.5MHz
  delay(10);
  timer_set(&periodic_timer, CLOCK_SECOND / 2);
  timer_set(&arp_timer, CLOCK_SECOND * 10);
  uip_init();
}
Esempio n. 2
0
/**
 * Initialise SPI, separate from main initialisation so that
 * multiple SPI devices can be used together
 */
void EtherShield::ES_enc28j60SpiInit(){
  enc28j60SpiInit();
}