Ejemplo n.º 1
0
void sr_init(){
	SR_PORT &= ~((1<<SR_DATA_IN) | (1<<SR_DATA_CLK) | (1<<SR_LATCH_CLK));
	SR_DDR |= (1<<SR_DATA_IN) | (1<<SR_OUTPUT_EN) | (1<<SR_DATA_CLK) | (1<<SR_LATCH_CLK); 
	sr_clear(); 
	sr_set_state(SR_ENABLE); 
}
Ejemplo n.º 2
0
StorageRegister::StorageRegister() {
  sr_clear();
  _load();
}