First pass setting up doxygen documentation

There are a few things that still need to be commented, furthermore,
usage of the library needs to be explained in more detail. Also things
are still somewhat unorganized as the lcdLib library is packaged up with
the lcdOutput application for testing. Also a tiny USART library is
included but has nothing to do with the lcdLib except that its used by
the lcdOutput demo program. When the lcdLib library is ready it will be
split into its own repository with accompanying examples (one of which
may be the USART echo example (lcdOutput.c as of this commit).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
Collin J. Doering 2015-10-15 01:23:11 -04:00
parent 89a10c4802
commit bc48704477
6 changed files with 2452 additions and 50 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
*.hex
*.lst
*~
docs

19
USART.h
View File

@ -16,15 +16,28 @@
*/
/**
* File: USART.h
* Author: Collin J. Doering <collin.doering@rekahsoft.ca>
* Date: Oct 6, 2015
* @file USART.h
* @author Collin J. Doering <collin.doering@rekahsoft.ca>
* @date Oct 6, 2015
* @brief Functions to initialize, read and write using USART.
*/
/**
Initialize USART hardware.
*/
void initUSART(void);
/**
Transmit a single byte using USART.
*/
void transmitByte(uint8_t data);
/**
Transmit a string using USART.
*/
void transmitString(const char* data);
/**
Receive a single byte using USART
*/
uint8_t receiveByte(void);

View File

@ -16,40 +16,41 @@
*/
/**
* File: ansi_escapes.h
* Author: Collin J. Doering <collin.doering@rekahsoft.ca>
* Date: Oct 9, 2015
* @file ansi_escapes.h
* @author Collin J. Doering <collin.doering@rekahsoft.ca>
* @date Oct 9, 2015
* @brief Macros to ease writing ANSI escapes.
*/
#define CSI "\e["
#define CSI "\e[" ///< Control Sequence Introducer
#define CUU(n) CSI #n "A" // Cursor up
#define CUD(n) CSI #n "B" // Cursor down
#define CUF(n) CSI #n "C" // Cursor forward
#define CUB(n) CSI #n "D" // Cursor backward
#define CUU(n) CSI #n "A" ///< Cursor up
#define CUD(n) CSI #n "B" ///< Cursor down
#define CUF(n) CSI #n "C" ///< Cursor forward
#define CUB(n) CSI #n "D" ///< Cursor backward
#define CNL(n) CSI #n "E" // Cursor next line
#define CPL(n) CSI #n "F" // Cursor previous line
#define CNL(n) CSI #n "E" ///< Cursor next line
#define CPL(n) CSI #n "F" ///< Cursor previous line
#define CHA(n) CSI #n "G" // Cursor horizontal absolute
#define CUP(n,m) CSI #n ";" #m "H" // Cursor position
#define CHA(n) CSI #n "G" ///< Cursor horizontal absolute
#define CUP(n,m) CSI #n ";" #m "H" ///< Cursor position
#define ED(n) CSI #n "J" // Erase display
#define EL(n) CSI #n "K" // Erase in line
#define SU(n) CSI #n "S" // Scroll up
#define SD(n) CSI #n "T" // Scroll down
#define ED(n) CSI #n "J" ///< Erase display
#define EL(n) CSI #n "K" ///< Erase in line
#define SU(n) CSI #n "S" ///< Scroll up
#define SD(n) CSI #n "T" ///< Scroll down
#define HVP(n,m) CSI #n ";" #m "f" // Horizontal and vertical position
#define HVP(n,m) CSI #n ";" #m "f" ///< Horizontal and vertical position
// #define SGR(n,m) CSI #n #m // Select graphic rendition
// #define SGR(n,m) CSI #n #m ///< Select graphic rendition
#define AUX_ON CSI "5i" // AUX port on
#define AUX_OFF CSI "4i" // AUX port off
#define AUX_ON CSI "5i" ///< AUX port on
#define AUX_OFF CSI "4i" ///< AUX port off
// #define DSR CSI "6 n" // Device status report
// #define DSR CSI "6 n" ///< Device status report
#define SCP CSI "s" // Save cursor position
#define RCP CSI "u" // Restore cursor position
#define SCP CSI "s" ///< Save cursor position
#define RCP CSI "u" ///< Restore cursor position
#define HIDE_CURSOR CSI "?25l" // DECTCEM: hide cursor
#define SHOW_CURSOR CSI "?25h" // DECTCEM: show cursor
#define HIDE_CURSOR CSI "?25l" ///< DECTCEM: hide cursor
#define SHOW_CURSOR CSI "?25h" ///< DECTCEM: show cursor

2384
doxygen.conf Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,9 +16,10 @@
*/
/**
* File: lcdLib.h
* Author: Collin J. Doering <collin.doering@rekahsoft.ca>
* Date: Sep 29, 2015
* @file lcdLib.h
* @author Collin J. Doering <collin.doering@rekahsoft.ca>
* @date Sep 29, 2015
* @brief Functions to initialize, and operate a character LCD.
*/
// Includes -------------------------------------------------------------------------------
@ -76,7 +77,7 @@ void flashLED(uint8_t times);
//------------------------------------
/*
/**
Bring LCD_ENABLE line high, wait for LCD_ENABLE_HIGH_DELAY; then bring LCD_ENABLE line low
and wait for LCD_ENABLE_LOW_DELAY.
@ -84,12 +85,12 @@ void flashLED(uint8_t times);
*/
void clkLCD(void);
/*
/**
Wait until LCD_BF (busy flag) is cleared (low).
*/
void loop_until_LCD_BF_clear(void);
/*
/**
Given a 8 bit integer, writes the four MSB's (one nibble) to the LCD data bus.
Note: this is only defined in FOUR_BIT_MODE
@ -98,7 +99,7 @@ void loop_until_LCD_BF_clear(void);
void writeLCDNibble_(uint8_t);
#endif
/*
/**
Given an 8 bit integer, writes it to the LCD data bus.
This function does not ensure the LCD is ready to accept new data and thus needs to
@ -106,7 +107,7 @@ void writeLCDNibble_(uint8_t);
*/
void writeLCDByte_(uint8_t);
/*
/**
Given a 8 bit integer representing a LCD instruction, sends it to the LCD display.
Note that this function does not ensure the LCD is ready to accept a new instruction and thus
@ -114,13 +115,13 @@ void writeLCDByte_(uint8_t);
*/
void writeLCDInstr_(uint8_t);
/*
/**
Given a 8 bit integer representing a LCD instruction, waits until the LCD is ready and sends
the instruction.
*/
void writeLCDInstr(uint8_t);
/*
/**
Writes a character to the LCD display at the current cursor position.
Note that this function does not ensure the LCD is ready to accept a new character and thus
@ -128,24 +129,24 @@ void writeLCDInstr(uint8_t);
*/
void writeCharToLCD_(char);
/*
/**
Writes a character to the LCD display at the current cursor position after the LCD display is
ready for new data. Allows the following ASCII escapes: '\n', '\r', '\f' and '\b'; ignores
ASCII escape '\a'.
*/
void writeCharToLCD(char);
/*
/**
Writes a string to the LCD starting from the current cursor position.
*/
void writeStringToLCD(const char*);
/*
/**
Clears the display and positions the cursor in the top left of the LCD screen.
*/
void clearDisplay(void);
/*
/**
Brings the cursor the the top left of the LCD screen.
*/
void returnHome(void);
@ -155,12 +156,12 @@ void returnHome(void);
*/
char readCharFromLCD(void);
/*
/**
Initialize the LCD display via software initialization as specified by the datasheet.
*/
void initLCD(void);
/*
/**
Initialize the LCD display via its internal reset circuit.
Note: this is not the recommended way to initialize the LCD as it is unreliable and depends

View File

@ -16,9 +16,10 @@
*/
/**
* File: lcdLibConfig.h
* Author: Collin J. Doering <collin.doering@rekahsoft.ca>
* Date: Oct 4, 2015
* @file lcdLibConfig.h
* @author Collin J. Doering <collin.doering@rekahsoft.ca>
* @date Oct 4, 2015
* @brief Configuration file for lcdLib.h
*/
// Includes -------------------------------------------------------------------------------
@ -44,12 +45,12 @@
Screen characteristics
*/
#define LCD_CHARACTERS_PER_LINE 20
#define LCD_CHARACTERS_PER_LINE 20 ///< Number of characters per line of the LCD
#define LCD_NUMBER_OF_LINES 4 ///< Number of lines of the LCD
#define LCD_LINE_BEGINNINGS 0x00, \
0x40, \
0x14, \
0x54
#define LCD_NUMBER_OF_LINES 4
0x54 ///< Memory locations for each physical line ordered 1 to LCD_NUMBER_OF_LINES
/* Modes */