13.8.1.2.2 Workflow

  1. Read in the current input sampler state of push button pin, which has been configured as an input in the use-case setup code.
    bool pin_state = port_pin_get_input_level(BUTTON_0_PIN);
    
  2. Write the inverted pin level state to LED pin, which has been configured as an output in the use-case setup code.
    port_pin_set_output_level(LED_0_PIN, !pin_state);