Implementation of the uMIDI-HMI module.  
More...
#include <stddef.h>
#include "encoder.h"
#include "gpio.h"
#include "hmi.h"
 
Implementation of the uMIDI-HMI module. 
 
◆ init_hmi_module()
      
        
          | void init_hmi_module  | 
          ( | 
          const struct hmi_config *  | 
          config | ) | 
           | 
        
      
 
Initializes the HMI module according to the provided configuration. 
Registers event callbacks and configures GPIO ports used by the HMI module. 
- Parameters
 - 
  
    | config | the HMI module configuration  | 
  
   
 
 
◆ poll_hmi()
Polls the HMI inputs and executes registered callbacks if an event occurred. 
This procedure must be called in a slow background task to be able to process input events from the HMI board. 
 
 
◆ set_hmi_led()
      
        
          | void set_hmi_led  | 
          ( | 
          enum hmi_led  | 
          led,  | 
        
        
           | 
           | 
          bool  | 
          value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Turns a specific LED on or off. 
- Parameters
 - 
  
    | led | the LED to control  | 
    | value | true → LED on; false → LED off  | 
  
   
 
 
◆ show_bar_graph()
Uses the HMI's LEDs to display a nice "bar graph". 
- Parameters
 - 
  
    | percentage | the percentage to display  | 
  
   
 
 
◆ show_led_pattern()
Displays the specified pattern on the HMI's LEDs. 
- Parameters
 - 
  
    | pattern | the pattern to show  | 
  
   
- See also
 - hmi_led_pattern_t 
 
 
 
◆ encoder1
Initial value:= {
    .config = {
    },
}
4-phase rotary encoder 
Definition: encoder.h:51
 
 
Internal reference to encoder 1. 
 
 
◆ encoder2
Initial value:= {
    .config = {
    },
}
4-phase rotary encoder 
Definition: encoder.h:51
 
 
Internal reference to encoder 2. 
 
 
◆ hmi_config
Global HMI config struct. 
Holds pointers to used GPIO headers and callbacks. 
- See also
 - init_hmi_module