Change to examples so they also builds

This commit is contained in:
2021-03-19 17:37:37 +01:00
parent 530fb9c111
commit 1936746a40
6 changed files with 1449 additions and 90 deletions

View File

@ -1,6 +1,6 @@
/**
* @file
* max7456.h
* MAX7456.h
*
* Created on: 10 oct. 2012
* Author: Benoit
@ -10,30 +10,27 @@
#define MAX7456_H
//def next only if you changed your table for a non ascii one
//def next only if you changed your table for an ascii one
//i.e address 0x00 -> ' '
//....
// address 0x5A -> 'z'
// This may be passed on from the compiler if you are using platformio.
//#define MAX7456_TABLE_ASCII
#include "max7456registers.h"
#include "MAX7456Registers.h"
/**
* @mainpage Max7456 Arduino library
*/
/**
* @example Max7456WriteTable.cpp
* @mainpage MAX7456 Arduino library
*/
/**
* @class Max7456
* @brief Represents a max7456 device communicating through SPI port
* @class MAX7456
* @brief Represents a MAX7456 device communicating through SPI port
*/
class Max7456
class MAX7456
{
public:
@ -41,23 +38,23 @@ public:
/**
* Default constructor
*/
Max7456();
MAX7456();
/**
* Constructor
* Initialize communications and device
* @param pinCS : pin ~CS of the arduino where max7456 is plugged.
* @param pinCS : pin ~CS of the arduino where MAX7456 is plugged.
*/
Max7456(byte pinCS);
MAX7456(byte pinCS);
/**
* Initialize communications and device
* @param pinCS : pin ~CS of the arduino where max7456 is plugged.
* @param pinCS : pin ~CS of the arduino where MAX7456 is plugged.
* @code
* Max7456 osd;
* osd.init(9); //Note it's that it's the same than usinge constructor Max7456(byte pinCS).
* MAX7456 osd;
* osd.init(9); //Note it's that it's the same than usinge constructor MAX7456(byte pinCS).
* @endcode
*/
void init(byte pinCS);
@ -163,9 +160,9 @@ public:
/**
* Put some characters in the display memory of max7456.
* Put some characters in the display memory of MAX7456.
* The characters are given by their address in the
* character memory of the max7456.
* character memory of the MAX7456.
* @param chars : The characters address array to display
* @param size : the array size
* @param x : the horizontal position of the value on screen
@ -174,21 +171,21 @@ public:
* @param inv : if 1 then color character will be inverted
* @code
* char chars[0x04,0x45,0x54]; //the chars addresses array to be send to function.
* max.printMax7456Chars(chars,3,x,y);
* max.printMAX7456Chars(chars,3,x,y);
* @endcode
*/
void printMax7456Chars(byte chars[],byte size,byte x, byte y, byte blink = 0,byte inv = 0);
void printMAX7456Chars(byte chars[],byte size,byte x, byte y, byte blink = 0,byte inv = 0);
/**
* Put one character from the character memory in the display memory of max7456
* Put one character from the character memory in the display memory of MAX7456
* @param address : The address in character memory of the character to be displayed
* @param x : the horizontal position of the string on screen
* @param y : the vertical position of the string on screen
* @param blink : if 1 then character will blink
* @param inv : if 1 then color character will be inverted
*/
void printMax7456Char(const byte address, byte x, byte y, byte blink=0, byte inv=0);
void printMAX7456Char(const byte address, byte x, byte y, byte blink=0, byte inv=0);
/**
* Print a character to Serial port
@ -229,7 +226,7 @@ public:
private:
byte giveMax7456CharFromAsciiChar(char ascii);
byte giveMAX7456CharFromAsciiChar(char ascii);
static void printPixel(byte value);
byte _pinCS;