no-OS
Loading...
Searching...
No Matches
example.c File Reference

Implementation of ssd1306 example for demo project. More...

#include "common_data.h"
#include "no_os_util.h"
#include <stdint.h>
#include <stdio.h>
#include "no_os_delay.h"
#include "no_os_i2c.h"
#include "display.h"
#include "ssd_1306.h"
#include "lvgl.h"
#include "lv_types.h"
#include "lv_display.h"
#include "lv_display_private.h"
#include "no_os_init.h"
#include <string.h>
#include "no_os_display.h"
Include dependency graph for example.c:

Macros

#define LV_ATTRIBUTE_MEM_ALIGN
 
#define SSD1306_HOR_REZ   128
 
#define SSD1306_VER_REZ   64
 
#define SSD1306_BUFFER_SIZE   ((SSD1306_HOR_REZ * SSD1306_VER_REZ) / 8 + 8)
 

Functions

void my_flush_cb (lv_display_t *disp, const lv_area_t *area, lv_color_t *color_p)
 
int display_task ()
 Initialize the display task.
 
int configure_uart ()
 Configure the UART.
 
int configure_display ()
 Configure the display.
 
void test_draw ()
 Test function to draw a label with scrolling text.
 
void startup_screen ()
 Display startup screen.
 
int example_main (void)
 Main function.
 

Variables

const LV_ATTRIBUTE_MEM_ALIGN uint8_t star_wars_logo []
 

Detailed Description

Implementation of ssd1306 example for demo project.

Author
Robert Budai (rober.nosp@m.t.bu.nosp@m.dai@a.nosp@m.nalo.nosp@m.g.com)

Copyright 2025(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “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 ANALOG DEVICES, INC. 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.

Macro Definition Documentation

◆ LV_ATTRIBUTE_MEM_ALIGN

#define LV_ATTRIBUTE_MEM_ALIGN

◆ SSD1306_BUFFER_SIZE

#define SSD1306_BUFFER_SIZE   ((SSD1306_HOR_REZ * SSD1306_VER_REZ) / 8 + 8)

◆ SSD1306_HOR_REZ

#define SSD1306_HOR_REZ   128

◆ SSD1306_VER_REZ

#define SSD1306_VER_REZ   64

Function Documentation

◆ configure_display()

int configure_display ( )

Configure the display.

Returns
int
Here is the caller graph for this function:

◆ configure_uart()

int configure_uart ( )

Configure the UART.

Returns
int
Here is the caller graph for this function:

◆ display_task()

int display_task ( )

Initialize the display task.

Returns
int
Here is the caller graph for this function:

◆ example_main()

int example_main ( void )

Main function.

Basic example main executiont.

Returns
int

Set the threshold voltage to 5V

The comparator output will be available on the GPO_A pin

Set the DAC output on channel C to 5V

Measure input current on channel D

Initialize the ADC_RDY GPIO and associated IRQ event

Returns
0 if success, negative error code otherwise

Negative temperature

Positive temperature

Negative temperature

Positive temperature

Here is the caller graph for this function:

◆ my_flush_cb()

void my_flush_cb ( lv_display_t * disp,
const lv_area_t * area,
lv_color_t * color_p )
Here is the caller graph for this function:

◆ startup_screen()

void startup_screen ( )

Display startup screen.

Here is the caller graph for this function:

◆ test_draw()

void test_draw ( )

Test function to draw a label with scrolling text.

Here is the caller graph for this function:

Variable Documentation

◆ star_wars_logo

const LV_ATTRIBUTE_MEM_ALIGN uint8_t star_wars_logo[]