#[derive(Debug)]
struct RobotState {
    led_on: bool,
    button_count: u32,
    last_adc: u16,
}

fn print_state(state: &RobotState) {
    // TODO: print the different elements of RobotState
    println!(
        "state => led_on={}, button_count={}, last_adc={}", 
        ???
    );
}

fn toggle_led(state: &mut RobotState) {
    // TODO: change the LED state to the inverse of itself
    state.led_on = ??
}

fn record_button_press(state: &mut RobotState) {
    // TODO: increase the button counter on press
    state.button_count = ??
}

fn update_adc(state: &mut RobotState, raw: u16) {
    // TODO: update the adc value with the given one
    state.last_adc = ??
}

fn main() {
    // TODO: change the RobotState so we can edit its values
    let state = RobotState {
        led_on: false,
        button_count: 0,
        last_adc: 0,
    };

    print_state(&state);

    toggle_led(&mut state);
    record_button_press(&mut state);
    update_adc(&mut state, 2024);

    print_state(&state);
}
