ucglib_xmega_hal  4.0
Xmega Hardware Abstraction Layer for Ucglib
main_test_hal.c File Reference

Test file for Xmega Hardware Abstraction Layer Library 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 "ucglib/ucg.h"
#include "ucglib_xmega.h"

Functions

int main (void)
 Main function to demonstrate the usage of ucglib_xmega library.
 

Variables

pin_t connectArraySPI []
 connectArraySPI contains the non-SPI connections with display More...
 
ucg_t ucg
 ucg is a necessary global structure for ucg_lib
 

Detailed Description

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

Author
Wim Dolman (w.e.dolman@hva.nl)
Date
30-09-2020
Version
4.0

Basis example how to use the HAL 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)                    connected to 3V3/5V
*                               D6  (MISO)  not connected
* 
Note
Usage with Atmel Studio:
  • Add a "New Folder" ucglib to an Atmel Studio project
  • Copy all files from the csrc folder of Kraus to ucglib
  • Copy ucg_bmp.c, ucg_print.c, ucg_fonts.c and ucg.h to the project overwriting the original ucg_fonts.c and ucg.h
  • Add all files from ucglib to the Atmel Studio project
  • Add main_test_hal.c, ucglib_xmega_hal.c and ucglib_xmega.h to the project
  • Add clock.c and clock.h to the project After this you can build the example.

Variable Documentation

◆ connectArraySPI

pin_t connectArraySPI[]
Initial value:
= {
{ UCG_XMEGA_PIN_RST, &PORTD, PIN3_bp },
{ UCG_XMEGA_PIN_CD, &PORTD, PIN2_bp },
{ UCG_XMEGA_PIN_NULL }
}

connectArraySPI contains the non-SPI connections with display