Byggern
OLED_SCP Class Reference

A class to communicate with the OLED display through the SCP. More...

#include <oled_scp.h>

Inheritance diagram for OLED_SCP:
OLED Stream

Public Member Functions

void Init (uint8_t width, uint8_t height, SCP &channel, uint8_t command)
 
- Public Member Functions inherited from OLED
void Init (uint8_t width, uint8_t height)
 
void GoToLine (uint8_t line)
 
void Clear ()
 
void ClearLine ()
 
void WriteByte (uint8_t page, uint8_t column, uint8_t byte)
 
void WriteByteArray (uint8_t page, uint8_t column, uint8_t *byte_array, uint8_t length)
 
void Repaint ()
 
void SetNumberOfLines (uint8_t number_of_lines)
 
void WriteBitmap (uint8_t **pixels, uint8_t bitmap_width, uint8_t bitmap_height, uint8_t x, uint8_t y, bool is_progmem)
 
void SetFont (uint8_t *font, uint8_t width, uint8_t height)
 
void WriteLine (char *string, uint8_t length, uint8_t line, uint8_t offset)
 
uint8_t GetYCoordinateFromLineNumber (uint8_t line)
 
uint8_t GetMaxLineCharacters ()
 
- Public Member Functions inherited from Stream
 Stream (uint16_t input_stream_size, uint16_t output_stream_size)
 
virtual void Write (uint8_t *string, uint16_t size)
 
virtual uint16_t Read (uint8_t *string, uint16_t size)
 
virtual bool ReadByte (uint8_t &byte)
 
virtual void WriteByte (uint8_t byte)
 
virtual uint8_t GetAvailableWriteBytes ()
 
virtual uint8_t GetAvailableReadBytes ()
 
virtual bool CheckInputOverflowFlag ()
 
virtual bool CheckOutputOverflowFlag ()
 
virtual uint16_t GetInputBufferLength ()
 
virtual uint16_t GetOutputBufferLength ()
 
virtual void FlushInputBuffer ()
 
virtual void FlushOutputBuffer ()
 

Static Public Member Functions

static OLED_SCPGetInstance ()
 

Protected Member Functions

 OLED_SCP ()
 
virtual void WriteByteToOLED (volatile uint8_t *address, uint8_t data)
 
- Protected Member Functions inherited from OLED
 OLED ()
 
void GetBitmapForCharacter (char character, uint8_t *&character_bitmap)
 
- Protected Member Functions inherited from Stream
virtual uint16_t ReadFromBuffer (uint8_t *buffer, uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty, uint8_t *string, uint16_t &string_size)
 
virtual void WriteToBuffer (uint8_t *buffer, uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty, bool &overflow_flag, uint8_t *string, uint16_t &string_size, void(*cb)(Stream *stream))
 
virtual bool ReadByteFromBuffer (uint8_t &byte, uint8_t *buffer, uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty)
 
virtual void WriteByteToBuffer (uint8_t *buffer, uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty, bool &overflow_flag, uint8_t &byte, void(*cb)(Stream *stream))
 
virtual void WriteByteToInputStream (uint8_t &byte)
 
virtual bool ReadByteFromOutputStream (uint8_t &byte)
 
virtual void WriteToInputStream (uint8_t *string, uint16_t size)
 
virtual uint16_t ReadFromOutputStream (uint8_t *string, uint16_t size)
 
virtual uint16_t CalculateLength (uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty)
 
virtual void FlushStream (uint16_t &start_index, uint16_t &stop_index, uint16_t &buffer_size, bool &empty)
 

Protected Attributes

SCPchannel = nullptr
 
uint8_t command
 
uint8_t * bytes_to_send
 
uint8_t bytes_to_send_index = 0
 
- Protected Attributes inherited from OLED
uint8_t current_line = 0
 
uint8_t display_width = 0
 
uint8_t display_height = 0
 
uint8_t number_of_pages = 0
 
uint8_t number_of_lines = 0
 
volatile uint8_t * oled_command = (volatile uint8_t*)0x8000
 
volatile uint8_t * oled_data = (volatile uint8_t*)0x8100
 
uint8_t ** matrix
 
uint8_t pixels_per_line
 
uint8_t * font = nullptr
 
uint8_t font_width
 
uint8_t font_height
 
- Protected Attributes inherited from Stream
uint8_t * input_buffer
 
uint8_t * output_buffer
 
uint16_t input_buffer_start_index = 0
 
uint16_t output_buffer_start_index = 0
 
uint16_t input_buffer_stop_index
 
uint16_t output_buffer_stop_index
 
uint16_t input_buffer_size
 
uint16_t output_buffer_size
 
void(* event_input_buffer_not_empty )(Stream *stream) = nullptr
 
void(* event_output_buffer_not_empty )(Stream *stream) = nullptr
 
bool input_buffer_empty = true
 
bool output_buffer_empty = true
 
bool input_buffer_overflowed = false
 
bool output_buffer_overflowed = false
 

Detailed Description

A class to communicate with the OLED display through the SCP.

Constructor & Destructor Documentation

§ OLED_SCP()

OLED_SCP::OLED_SCP ( )
inlineprotected

Singleton constructor

Member Function Documentation

§ GetInstance()

static OLED_SCP& OLED_SCP::GetInstance ( )
inlinestatic

A Singleton implementation of this class

§ Init()

void OLED_SCP::Init ( uint8_t  width,
uint8_t  height,
SCP channel,
uint8_t  command 
)

Initializes the whole screen.

Parameters
widthThe width of the screen in pixels
heightThe height of the screen in pixels
socketSocket to write through.

§ WriteByteToOLED()

void OLED_SCP::WriteByteToOLED ( volatile uint8_t *  address,
uint8_t  data 
)
protectedvirtual

Writes a single byte to the OLED. This can be implemented using the external memory interface or using whatever other technology like for instance the SCP.

Parameters
addressThe address to write to.
dataThe data to write.

Reimplemented from OLED.


The documentation for this class was generated from the following files: