FlexBook / Mbed 2 deprecated FlexBook171204a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers hal.h Source File

hal.h

00001 //
00002 // Filename: hal.h
00003 //
00004 // Flexbook Hardware Abstraction Layer.
00005 //
00006 
00007 #ifndef HAL_H
00008 #define HAL_H
00009 
00010 #include "pagefactory.h"
00011 
00012 /**
00013  * @brief Namespace to contain all Hardware Abstraction Layer functions.
00014  */
00015 namespace HAL {
00016 
00017 /**
00018  * @brief Initialise the HAL.
00019  * This must be called before accessing any hardware functions.
00020  */
00021 void Initialise();
00022 
00023 /**
00024  * @brief Enable the indicated pages.
00025  * This should be called before creating pages to ensure that they are powered.
00026  * pages A bit mask of the pages to be powered.
00027  */
00028 void EnablePowerToPages(Flexbook::PageType pages);
00029 
00030 /**
00031  * @brief Read the current page type from the hardware.
00032  * @return The selected hardware page type.
00033  */
00034 Flexbook::PageType GetPageType();
00035 
00036 class MCP23S17;
00037 MCP23S17 &GetMCP23S17();
00038 
00039 } // End HAL namespace.
00040 
00041 #endif // HAL_H