Commit f040cd43 authored by Øystein Smith's avatar Øystein Smith

One inversion to many on the input, plus unknown fix from 2018

parent 79af9ae1
......@@ -20,7 +20,9 @@ void adc_init( void )
{
//enable
ADCSRA = (1 << ADEN)|(7 << ADPS0); // enable and set clock to 16MHz / 128 = 125kHz
ADMUX = (1 << REFS0);
//set mux
ADMUX = (ADMUX & ~ADC_MUX_bm) | ADC_ONTIME_ADC_MUX_gc;
adc_channel_select = ADC_ONTIME_SELECT;
......
......@@ -45,5 +45,5 @@ uint8_t gpio_get_ontime( void )
uint8_t gpio_get_input( void )
{
return !!(GPIO_SIGNAL_INPUT_PIN & GPIO_SIGNAL_INPUT_PIN0_bm);
return !(GPIO_SIGNAL_INPUT_PIN & GPIO_SIGNAL_INPUT_PIN0_bm);
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment