Atmel Software Framework

dip204.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "board.h"
#include "conf_dip204.h"
#include "dip204.h"
#include "gpio.h"
#include "compiler.h"
#include "spi.h"
#include "pwm.h"
#include "delay.h"


#define DIP204_CGRAM_BASE_ADDR   0x40
#define DIP204_PERIOD_MAX   50
#define DIP204_READ_COMMAND   0xFC
#define DIP204_READ_DATA   0xFE
#define DIP204_WRITE_COMMAND   0xF8
#define DIP204_WRITE_DATA   0xFA


void dip204_clear_display (void)
void dip204_create_char (char ascii_code, const unsigned char data[8])
void dip204_hide_cursor (void)
void dip204_init (backlight_options option, bool backlight_on)
void dip204_printf_string (const char *format,...)
static void dip204_read_byte (unsigned char *byte)
 hardware abstraction layer to read a byte from LCD depends if LCD is plugged on SPI or on EBI More...
void dip204_read_data (unsigned char *data)
static void dip204_select (void)
 function to select the LCD More...
void dip204_set_backlight (backlight_power power)
void dip204_set_cursor_position (unsigned char column, unsigned char line)
void dip204_show_cursor (void)
static void dip204_unselect (void)
 function to unselect the LCD More...
static void dip204_wait_busy (void)
 function to wait for LCD becomes not busy More...
static void dip204_write_byte (unsigned char byte)
 hardware abstraction layer to send a byte to LCD depends if LCD is plugged on SPI or on EBI More...
void dip204_write_data (unsigned char data)
void dip204_write_string (const char *string)


static int channel_id = -1
static avr32_pwm_channel_t pwm_channel
static unsigned short pwm_duty
static spi_status_t spi_status

#define DIP204_CGRAM_BASE_ADDR   0x40

Referenced by dip204_create_char().

#define DIP204_PERIOD_MAX   50
#define DIP204_READ_COMMAND   0xFC

Read Command start byte, for Busy-flag checking

Referenced by dip204_create_char(), dip204_wait_busy(), and dip204_write_byte().

#define DIP204_READ_DATA   0xFE

Read Data from DDRAM

Referenced by dip204_read_data(), and dip204_write_byte().

#define DIP204_WRITE_COMMAND   0xF8
#define DIP204_WRITE_DATA   0xFA

static void dip204_read_byte ( unsigned char *  byte)

hardware abstraction layer to read a byte from LCD depends if LCD is plugged on SPI or on EBI

byteInput. byte read from the LCD (D7 .. D0)

References Assert, bit_reverse8, DIP204_SPI, SPI_OK, spi_read(), spi_status, and spi_write().

Referenced by dip204_create_char(), dip204_read_data(), and dip204_wait_busy().

static void dip204_write_byte ( unsigned char  byte)

int channel_id = -1
avr32_pwm_channel_t pwm_channel

the PWM channel config

Referenced by dip204_init(), dip204_set_backlight(), and main().

unsigned short pwm_duty

the duty cycle that will be updated to change backlight power

Referenced by dip204_init(), and dip204_set_backlight().

spi_status_t spi_status