Interface Design
In firmware development, we create interfaces (commonly known as drivers) to interact with hardware components like microcontroller (MCU) peripherals, sensors (eg: temperature), and actuators (eg: motor).
These interfaces allow us to work efficiently by abstracting away the implementation details. An interface for a temparature sensor may look like
void sensor_init(void);
float sensor_read_temperature(void);
Under the hood, the sensor may talks to the MCU over an I2C bus - probably using the peripheral driver for the MCU's I2C module.
// bad interface by the way
void i2c_init(void);