indentation

master
Eggert Jung 3 years ago
parent 0ba716fb3e
commit 029cb594cb

@ -40,7 +40,7 @@ uint32_t HX711_get_data(uint8_t clk_PIN, uint8_t data_PIN, uint8_t gain_for_next
extra_clk_pluses = 2;
break;
default:
extra_clk_pluses = 1;
extra_clk_pluses = 1;
}
for(uint8_t i = 0; i < extra_clk_pluses; i++){
PORTB |= (1 << clk_PIN); //set clock-PIN high
@ -52,7 +52,7 @@ uint32_t HX711_get_data(uint8_t clk_PIN, uint8_t data_PIN, uint8_t gain_for_next
/* Convert 24bit Two's complement to 32bit Two's complement
if MSB from 24Bit result is 1 aka negative*/
if(data & (1L<<23)){
data |= 0xFFL << 24;
data |= 0xFFL << 24;
}
return data;
}
@ -83,12 +83,12 @@ int main(void){
DDRB |= (1<<3);
modbusSetAddress(1);
modbusInit();
modbusInit();
sei();
/* modbus tick timer */
TCCR0B|=(1<<CS01);
TIMSK0|=(1<<TOIE0);
TCCR0B|=(1<<CS01);
TIMSK0|=(1<<TOIE0);
while(1){
modbusGet();
@ -96,5 +96,5 @@ int main(void){
}
ISR(TIMER0_OVF_vect) { //this ISR is called 9765.625 times per second
modbusTickTimer();
modbusTickTimer();
}