Library for the MAX7219 LED display driver
Fork of MAX7219 by
Revision 7:c11c81a0d08f, committed 2018-04-28
- Comitter:
- viewdeep51
- Date:
- Sat Apr 28 10:21:54 2018 +0000
- Parent:
- 6:779ee20a3759
- Commit message:
- POT final code dated 28/04/18
Changed in this revision
max7219.cpp | Show annotated file Show diff for this revision Revisions of this file |
max7219.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 779ee20a3759 -r c11c81a0d08f max7219.cpp --- a/max7219.cpp Sat Jan 13 11:48:45 2018 +0000 +++ b/max7219.cpp Sat Apr 28 10:21:54 2018 +0000 @@ -391,55 +391,4 @@ } return(rtn_val); -} - - -//********************************************************************* -int32_t Max7219::clear_digit(uint8_t device_number, uint8_t digit) -{ - int32_t rtn_val = -1; - uint8_t idx = 0; - - if(digit > MAX7219_DIGIT_7) - { - rtn_val = -3; - } - else if(digit < MAX7219_DIGIT_0) - { - rtn_val = -4; - } - else - { - if(device_number > _num_devices) - { - rtn_val = -1; - } - else if(device_number == 0) - { - rtn_val = -2; - } - else - { - _p_cs->write(0); - for(idx = _num_devices; idx > 0; idx--) - { - if(idx == device_number) - { - _p_spi->write(digit); - _p_spi->write(0); - } - else - { - _p_spi->write(MAX7219_NO_OP); - _p_spi->write(0); - } - } - _p_cs->write(1); - - rtn_val = 0; - } - } - - return(rtn_val); -} - +} \ No newline at end of file
diff -r 779ee20a3759 -r c11c81a0d08f max7219.h --- a/max7219.h Sat Jan 13 11:48:45 2018 +0000 +++ b/max7219.h Sat Apr 28 10:21:54 2018 +0000 @@ -366,25 +366,6 @@ **************************************************************/ int32_t write_digit(uint8_t device_number, uint8_t digit, uint8_t data); - - /**********************************************************//** - * @brief Clears digit of given device - * - * @details - * - * On Entry: - * @param[in] device_number - device to write too - * @param[in] digit - digit to clear - * - * On Exit: - * - * @return Returns 0 on success\n - * Returns -1 if device number is > _num_devices\n - * Returns -2 if device number is 0\n - * Returns -3 if digit > 8\n - * Returns -4 if digit < 1\n - **************************************************************/ - int32_t clear_digit(uint8_t device_number, uint8_t digit); private: