Defines |
#define | F_CPU 16000000UL |
| Frequency of CPU, used for _delay_XX functions.
|
#define | __DELAY_BACKWARD_COMPATIBLE__ |
Functions |
void | Led1On () |
| Turn on Led1.
|
void | Led2On () |
| Turn on Led2.
|
void | Led3On () |
| Turn on Led3.
|
void | Led4On () |
| Turn on Led4.
|
void | Led1Off () |
| Turn off Led1.
|
void | Led2Off () |
| Turn off Led2.
|
void | Led3Off () |
| Turn off Led3.
|
void | Led4Off () |
| Turn off Led4.
|
void | T_C4On () |
void | T_C8On () |
void | T_C4Off () |
void | T_C8Off () |
void | JTAG_P1_High () |
void | JTAG_P1_Low () |
void | JTAG_P3_High () |
void | JTAG_P3_Low () |
uint8_t | GetButtonA () |
| Get status of button A.
|
uint8_t | GetButtonB () |
| Get status of button B.
|
uint8_t | GetButtonC () |
| Get status of button C.
|
uint8_t | GetButtonD () |
| Get status of button D.
|
uint8_t | GetButton () |
| Returs a 1-hot encoded list of buttons pressed.
|
uint8_t | GetLCDStatus () |
uint8_t | GetLCDState () |
| Return the state (on/off) of the LCD.
|
void | SetLCDState (uint8_t state) |
| Set the state of the LCD.
|
uint8_t | SendLCDCommand (uint8_t RS, uint8_t RW, uint8_t data, uint16_t delay_us) |
void | FillScreen () |
void | WriteStringLCD (char *string, uint8_t len) |
| Display a string on LCD.
|
int | LcdPutchar (char c, FILE *unused) |
| Send character to the LCD display.
|
void | InitLCD () |
| Initialize LCD.
|
uint8_t | CheckLCD () |
| Check if the LCD is working properly.
|
void | LCDOff () |
| Switch LCD off.
|
void | LCDOn () |
| Switch LCD on.
|
void | WriteSingleByteEEPROM (uint16_t addr, uint8_t data) |
| Write a single byte to EEPROM.
|
uint8_t | ReadSingleByteEEPROM (uint16_t addr) |
| Read a single byte from EEPROM.
|
void | WriteBytesEEPROM (uint16_t addr, uint8_t *data, uint16_t len) |
| Write multiple bytes to EEPROM.
|
uint8_t * | ReadBytesEEPROM (uint16_t addr, uint16_t len) |
| Read multiple bytes from EEPROM.
|
void | InitUSART (uint16_t baudUBRR) |
| Initialise USART.
|
void | DisableUSART () |
| Disable USART.
|
void | SendCharUSART (char data) |
char | GetCharUSART (void) |
void | FlushUSART (void) |
char * | GetLineUSART () |
void | SendLineUSART (const char *data) |
scd_io.c source file
This file implements the functions for all micro-controller I/O functions, including control of LCD, leds and buttons
Copyright (C) 2012 Omar Choudary (omar.choudary@cl.cam.ac.uk)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file scd_io.c.