![]() |
MAX7219 Arduino Library
version: 1.0.0
|
#include <max7219.h>
Public Member Functions | |
| Max7219 () | |
| Constructor for Max7219 Class. More... | |
| void | begin (uint8_t mosi, uint8_t sclk, uint8_t cs) |
| use in void setup() More... | |
| void | end () |
| used inplace of destructor More... | |
| uint8_t | set_num_devices (uint8_t num_devices) |
| Sets the number of MAX7219 devices being used. Defaults to one. More... | |
| void | set_display_test (void) |
| Tests all devices being used. More... | |
| void | clear_display_test (void) |
| Stops test. More... | |
| uint8_t | init_device (max7219_configuration_t config) |
| initializes specific device in display with given config data More... | |
| void | init_display (max7219_configuration_t config) |
| initializes all devices with given config data More... | |
| uint8_t | enable_device (uint8_t device_number) |
| enables specific device in display More... | |
| void | enable_display (void) |
| enables all device in display More... | |
| uint8_t | disable_device (uint8_t device_number) |
| disables specific device in display More... | |
| void | disable_display (void) |
| disables all devices in display More... | |
| uint8_t | write_digit (uint8_t device_number, uint8_t digit, uint8_t data) |
| writes digit of given device with given data, user must enter correct data for decode_mode chosen More... | |
| uint8_t | clear_digit (uint8_t device_number, uint8_t digit) |
| clears digit of given device More... | |
| uint8_t | device_all_on (uint8_t device_number) |
| turns on all segments/digits of given device More... | |
| uint8_t | device_all_off (uint8_t device_number) |
| turns off all segments/digits of given device More... | |
| void | display_all_on (void) |
| turns on all segments/digits of display More... | |
| void | display_all_off (void) |
| turns off all segments/digits of display More... | |
| Max7219::Max7219 | ( | ) |
| void Max7219::begin | ( | uint8_t | mosi, |
| uint8_t | sclk, | ||
| uint8_t | cs | ||
| ) |
use in void setup()
initializes given pins for use with 'shiftout'
On Entry:
| [in] | mosi | - pin to use for mosi |
| [in] | sclk | - pin to use for sclk |
| [in] | cs | - pin to use for cs |
On Exit:
| uint8_t Max7219::clear_digit | ( | uint8_t | device_number, |
| uint8_t | digit | ||
| ) |
clears digit of given device
On Entry:
| [in] | device_number | - device to write too |
| [in] | digit | - digit to clear |
On Exit:
| void Max7219::clear_display_test | ( | void | ) |
Stops test.
Clear bit0 of DISPLAY_TEST regiser in all devices
On Entry:
On Exit:
| uint8_t Max7219::device_all_off | ( | uint8_t | device_number | ) |
turns off all segments/digits of given device
On Entry:
| [in] | device_number | - device to write too |
On Exit:
| uint8_t Max7219::device_all_on | ( | uint8_t | device_number | ) |
turns on all segments/digits of given device
On Entry:
| [in] | device_number | - device to write too |
On Exit:
| uint8_t Max7219::disable_device | ( | uint8_t | device_number | ) |
disables specific device in display
On Entry:
| [in] | device_number | - device to disable |
On Exit:
| void Max7219::disable_display | ( | void | ) |
disables all devices in display
On Entry:
On Exit:
| void Max7219::display_all_off | ( | void | ) |
turns off all segments/digits of display
On Entry:
On Exit:
| void Max7219::display_all_on | ( | void | ) |
turns on all segments/digits of display
On Entry:
On Exit:
| uint8_t Max7219::enable_device | ( | uint8_t | device_number | ) |
enables specific device in display
On Entry:
| [in] | device_number | - device to enable |
On Exit:
| void Max7219::enable_display | ( | void | ) |
enables all device in display
On Entry:
On Exit:
| void Max7219::end | ( | ) |
used inplace of destructor
On Entry:
On Exit:
| uint8_t Max7219::init_device | ( | max7219_configuration_t | config | ) |
initializes specific device in display with given config data
specific device is determined by config.device_number
On Entry:
| [in] | config | - Structure containing configuration data of device |
On Exit:
| void Max7219::init_display | ( | max7219_configuration_t | config | ) |
initializes all devices with given config data
all devices are configured with given data
On Entry:
| [in] | config | - Structure containing configuration data On Exit: |
| void Max7219::set_display_test | ( | void | ) |
Tests all devices being used.
Sets bit0 of DISPLAY_TEST regiser in all devices
On Entry:
On Exit:
| uint8_t Max7219::set_num_devices | ( | uint8_t | num_devices | ) |
Sets the number of MAX7219 devices being used. Defaults to one.
On Entry:
| [in] | num_devices | - number of MAX7219 devices being used, must be >= 1. |
On Exit:
| uint8_t Max7219::write_digit | ( | uint8_t | device_number, |
| uint8_t | digit, | ||
| uint8_t | data | ||
| ) |
writes digit of given device with given data, user must enter correct data for decode_mode chosen
On Entry:
| [in] | device_number | - device to write too |
| [in] | digit | - digit to write |
| [in] | data | - data to write |
On Exit: