Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SevenSegmentDisplay.h
- Committer:
- tbjazic
- Date:
- 2014-12-11
- Revision:
- 2:1c0018e87bd5
- Parent:
- 1:f7a9e4c8ece6
- Child:
- 3:9c9257dda979
File content as of revision 2:1c0018e87bd5:
/** * @author Toni Bjazic * @section LICENSE * Creative Commons CC BY-SA * @section DESCRIPTION * A class for controling the output of 7-segment displays (common anode or common * cathode). */ #ifndef SEVEN_SEGMENT_DISPLAY_H_KEY #define SEVEN_SEGMENT_DISPLAY_H_KEY #include "mbed.h" enum ConnectionMode {CommonAnode, CommonCathode}; class SevenSegmentDisplay { public: SevenSegmentDisplay(PinName a, PinName b, PinName c, PinName d, PinName e, PinName f, PinName g, PinName dp, ConnectionMode cm = CommonAnode); void init(); void print(char); private: BusInOut display; ConnectionMode mode; void turnOn(int); }; #endif