Microchip® Advanced Software Framework

oled1.h File Reference

OLED1 Xplained Pro LED and button driver for FreeRTOS demo.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <board.h>
#include <compiler.h>
#include <port.h>

Data Structures

struct  oled1_instance
 Driver instance struct. More...
 

Macros

#define _OLED1_CREATE_INSTANCE(name, ext_header)
 
#define OLED1_CREATE_INSTANCE(name, ext_header)   _OLED1_CREATE_INSTANCE(name, ext_header)
 Create a driver instance. More...
 
Constants
#define OLED1_LED_ACTIVE   false
 Active level for LEDs. More...
 
#define OLED1_BUTTON_ACTIVE   false
 Active level for buttons. More...
 

Enumerations

enum  oled1_button_id {
  OLED1_BUTTON1_ID,
  OLED1_BUTTON2_ID,
  OLED1_BUTTON3_ID
}
 IDs for each of the on-board buttons. More...
 
enum  oled1_led_id {
  OLED1_LED1_ID,
  OLED1_LED2_ID,
  OLED1_LED3_ID
}
 IDs for each of the on-board LEDs. More...
 

Functions

static void oled1_init (const struct oled1_instance *const oled1)
 Initialize hardware for driver instance. More...
 
LED manipulation
static uint8_t _oled1_get_led_pin (const struct oled1_instance *const oled1, const enum oled1_led_id led_id)
 Get the pin identifier for a given LED number in instance. More...
 
static bool oled1_get_led_state (const struct oled1_instance *const oled1, const enum oled1_led_id led_id)
 Get the state of a LED. More...
 
static void oled1_set_led_state (const struct oled1_instance *const oled1, const enum oled1_led_id led_id, const bool state)
 Set the state of a LED. More...
 
static void oled1_toggle_led_state (const struct oled1_instance *const oled1, const enum oled1_led_id led_id)
 Set the state of a LED. More...
 
Button manipulation
static uint8_t _oled1_get_button_pin (const struct oled1_instance *const oled1, const enum oled1_button_id button_id)
 Get the pin identifier for a given button number in instance. More...
 
static bool oled1_get_button_state (const struct oled1_instance *const oled1, const enum oled1_button_id button_id)
 Get the state of a button. More...