2018-02-06 11:54:57 +01:00
|
|
|
/* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/** SSD1306 OLED library (API)
|
|
|
|
* @file oled_ssd1306.h
|
|
|
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
|
|
|
* @date 2018
|
2018-03-21 23:20:05 +01:00
|
|
|
* @note peripherals used: I2C @ref oled_ssd1306_i2c
|
2018-02-06 11:54:57 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** setup OLED display
|
|
|
|
* @return if the display setup is successful, else the display is probably not on the I2C bus
|
|
|
|
*/
|
|
|
|
bool oled_ssd1306_setup(void);
|
|
|
|
/** switch OLED display on */
|
|
|
|
void oled_ssd1306_on(void);
|
|
|
|
/** switch OLED display off */
|
|
|
|
void oled_ssd1306_off(void);
|
|
|
|
/** test OLED display: switch entire screen on for a brief time */
|
|
|
|
void oled_ssd1306_test(void);
|
|
|
|
/** send data to display to OLED display
|
|
|
|
* @param[in] display_data data to display (first byte is left column, MSb is top pixel, warps pages)
|
|
|
|
* @param[in] display_length length of data to display
|
|
|
|
*/
|
|
|
|
void oled_ssd1306_display(const uint8_t* display_data, uint16_t display_length);
|