Implementation of display Driver.
More...
#include <stdlib.h>
#include <stdbool.h>
#include "display.h"
#include "no_os_error.h"
#include "no_os_alloc.h"
#include <string.h>
|
| int32_t | display_init (struct display_dev **device, const struct display_init_param *param) |
| | Initializes the display peripheral.
|
| |
| int32_t | display_remove (struct display_dev *device) |
| | Frees the resources allocated by display_init().
|
| |
| int32_t | display_on (struct display_dev *device) |
| | Turns display on.
|
| |
| int32_t | display_off (struct display_dev *device) |
| | Turns display off.
|
| |
| int32_t | display_move_cursor (struct display_dev *device, uint8_t row, uint8_t column) |
| | Moves cursor to desired position.
|
| |
| int32_t | display_clear (struct display_dev *device) |
| | Clears data on display.
|
| |
| int32_t | display_print_string (struct display_dev *device, char *msg, uint8_t row, uint8_t column) |
| | Prints char string at selected position.
|
| |
| int32_t | display_print_char (struct display_dev *device, char chr, uint8_t row, uint8_t column) |
| | Prints single char at selected position.
|
| |
| int32_t | display_print_buffer (struct display_dev *device, char *buffer) |
| | Prints entire screen buffer.
|
| |
Implementation of display Driver.
- Author
- Andrei Porumb (andre.nosp@m.i.po.nosp@m.rumb@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2021(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ display_clear()
Clears data on display.
- Parameters
-
| device | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_init()
Initializes the display peripheral.
- Parameters
-
| device | - The device structure. |
| param | - The structure that contains the device initial parameters. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_move_cursor()
| int32_t display_move_cursor |
( |
struct display_dev * | device, |
|
|
uint8_t | row, |
|
|
uint8_t | column ) |
Moves cursor to desired position.
- Parameters
-
| device | - The device structure. |
| row | - row |
| column | - column |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_off()
Turns display off.
- Parameters
-
| device | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_on()
Turns display on.
- Parameters
-
| device | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_print_buffer()
| int32_t display_print_buffer |
( |
struct display_dev * | device, |
|
|
char * | buffer ) |
Prints entire screen buffer.
- Parameters
-
| device | - The device structure. |
| buffer | - The buffer to be printed. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_print_char()
| int32_t display_print_char |
( |
struct display_dev * | device, |
|
|
char | chr, |
|
|
uint8_t | row, |
|
|
uint8_t | column ) |
Prints single char at selected position.
- Parameters
-
| device | - The device structure. |
| chr | - char to be printed |
| row | - row |
| column | - column |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_print_string()
| int32_t display_print_string |
( |
struct display_dev * | device, |
|
|
char * | msg, |
|
|
uint8_t | row, |
|
|
uint8_t | column ) |
Prints char string at selected position.
- Parameters
-
| device | - The device structure. |
| msg | - char string pointer |
| row | - row |
| column | - column |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ display_remove()
Frees the resources allocated by display_init().
- Parameters
-
| device | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.