SSD1306/main.c

53 lines
1.1 KiB
C
Raw Normal View History

2020-10-13 04:45:09 -04:00
/**
2021-07-19 09:06:29 -04:00
* ---------------------------------------------------------------+
2020-10-13 04:45:09 -04:00
* @desc OLED SSD1306 example
2021-07-19 09:06:29 -04:00
* ---------------------------------------------------------------+
2020-10-13 04:45:09 -04:00
* Copyright (C) 2020 Marian Hrinko.
* Written by Marian Hrinko (mato.hrinko@gmail.com)
*
* @author Marian Hrinko
* @datum 06.10.2020
2021-07-19 09:06:29 -04:00
* @update 19.07.2021
2020-10-13 04:45:09 -04:00
* @file main.c
2021-07-19 09:06:29 -04:00
* @tested AVR Atmega328p
2020-10-13 04:48:57 -04:00
*
* @depend ssd1306.h
2021-07-19 09:06:29 -04:00
* ---------------------------------------------------------------+
* @descr Version 1.0 -> applicable for 1 display
* Version 2.0 -> rebuild to 'cacheMemLcd' array
2021-07-19 09:06:29 -04:00
* ---------------------------------------------------------------+
2020-10-13 04:45:09 -04:00
*/
// include libraries
2020-11-02 07:34:14 -05:00
#include <stdio.h>
2020-10-13 04:45:09 -04:00
#include "lib/ssd1306.h"
/**
2021-07-21 01:22:58 -04:00
* @desc Main function
2020-10-13 04:45:09 -04:00
*
* @param void
*
2021-07-21 01:22:58 -04:00
* @return int
2020-10-13 04:45:09 -04:00
*/
int main(void)
{
2022-11-24 16:41:52 -05:00
/*
uint8_t x = 0;
uint8_t y = 0;
*/
2020-10-13 04:45:09 -04:00
// init ssd1306
2022-11-24 16:41:52 -05:00
SSD1306_Init ();
// clear screen
SSD1306_ClearScreen ();
// draw string
2022-11-24 16:41:52 -05:00
SSD1306_DrawString ("SSD1306 MATIASUS");
/*
while (x < 10) {
2020-10-13 04:45:09 -04:00
2022-11-24 16:41:52 -05:00
SSD1306_DrawPixel (x++,y++);
}
*/
2020-10-13 04:45:09 -04:00
// return value
return 0;
}