HAL (Hardware Abstraction layer) is an interface between “normal” user modules and actual hardware. It makes hardware access easy and portable, it also gives us a layer where we can write optimized, hardware specific code if we need to. The following is a list of HAL classes.
|ADC||ADC (Analogue to Digital Converter) will read and analogue value and provide a 8- or 12- bit sampling value either through direct or buffered read. The HAL module embed the hardware into an easy to use module.|
|CRC||Hardware CRC calculation.|
|DAC||Digital to Analogue Conversion.|
|DMA||Direct Memory Access|
|ETC||ETC (Elapsed Time Clock) count the time in ms and ys since the MPU was started. This is used for time differences by the RTOS itself and available all through code using the ETC::millis() or ETC::micros() functions. ETC is the only mandatory part of our HAL.|
|GPIO||GPIO provide access to a collection of pins. GPIO collections are declared in global space by the user and support logical pin grouping. This means that user modules can toggle pins with a given name even if their location is different from hardware to hardware. This allows the user to “wire” a board during initialization to preserve portability on modules that need pin Access.|
|I2C||I2C bus interface.|
|RTC||Real Time Clock.|
|SPI||Serial Peripheral Interface is a high speed serial bus allowing devices to communicate. It is a network using a GPIO pin to select what device to talk with, but is also extended using the SmartSPI protocol. The SPI classes provide a serial interface with byte streams allowing the user to send/receive without digging into the complexity of a bit-stream.|
|Timer||Hardware Timers are found on most modern MCU’s. They offer a count-down clock and various features like the capability to connect to GPIO pins and send PWM or perform a more advanced 3-phase Motor Control. The Timer class provide a uniform wrapper exposing the capabilities without digging into vendor specific implementations.|
The list above is a draft that will change!
All HAL classes uses an empty, default constructor and need to call a Init(…) function as part of system initialization. This Init() function is hardware specific as it will “wire” the system.