#pragma once // Volatge discovery. Determines what the voltage of the christmas lights is. // // This is done by using channel 0 of the ADC (which is on pin PA4). There is a // voltage divider from the main power source to pin PA4 which uses a 4.7MOhm // resistor and a 470KOhm resistor to divide the voltage by 10, which may then // be turned into a reading on the ADC. // // This helps to determine if the lights being driven are WS2812b's or WS2811 as // the latter are run on 12v and use RGB instead of GRB byte order. #include typedef uint32_t millivolts_t; // Returns the estimated input voltage in millivolts. millivolts_t get_input_voltage();