ucglib_xmega_hal  2.1
Xmega Hardware Abstraction Layer for Ucglib
main.c File Reference

Test file for Xmega Hardware Abstraction Layer for ucglib from Oli Kraus for graphical color displays. More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "clock.h"
#include "csrc/ucg.h"
#include "ucglib_xmega_hal.h"

Macros

#define F_CPU   32000000UL
 System clock is 32 MHz.
 

Functions

int main (void)
 

Variables

ucg_t ucg
 ucg is a necessary global structure for ucg_lib
 

Detailed Description

Test file for Xmega Hardware Abstraction Layer for ucglib from Oli Kraus for graphical color displays.

Author
Wim Dolman (w.e.dolman@hva.nl)
Date
29-08-2019
Version
2.0

Basis example how to use ucglib with HAL for Xmega from Wim Dolman See for more info: https://dolman-wim.nl/xmega/libraries/index.php

This examples uses 1.8 inch TFT LCD Module and must be connected this way:

*             Display           Xmega
*             VCC               3V3
*             GND               GND
*             CS                D4  (SS)
*             RESET             D3
*             A0   (DC or CD)   D2
*             SDA               D5  (MOSI)
*             SCK               D7  (SCK)
*             LED  (BLK)        D1
*                               D6  (MISO)  not connected
* 
Note
Usage with Atmel Studio:
  • Add main.c, ucglib_hal_xmega.c and ucglib_hal_xmega.h to an Atmel Studio project
  • Add clock.c an d clock.h to this project
  • Add a empty folder to this project
  • Rename this folder as csrc
  • Add all files from the csrc folder of Oli Kraus in the csrc folder from the project You can find csrc folder of Oli Kraus on Github: https://github.com/olikraus/ucglib/tree/master/csrc
  • Overwrite the ucg.h in csrc with the ucg.h from this HAL.

After this you can build the example.

Function Documentation

◆ main()

int main ( void  )

Main function to demonstrate the usage of ucg_lib with the Xmega