c8800retro 2.0.0.0
8800 Retro Click Driver

API for configuring and manipulating 8800 Retro Click driver. More...

Topics

 8800 Retro Registers List
 List of registers of 8800 Retro Click driver.
 
 8800 Retro Registers Settings
 Settings for registers of 8800 Retro Click driver.
 
 8800 Retro MikroBUS Map
 MikroBUS pin mapping of 8800 Retro Click driver.
 

Functions

void c8800retro_cfg_setup (c8800retro_cfg_t *cfg)
 8800 Retro configuration object setup function.
 
err_t c8800retro_init (c8800retro_t *ctx, c8800retro_cfg_t *cfg)
 8800 Retro initialization function.
 
err_t c8800retro_default_cfg (c8800retro_t *ctx)
 8800 Retro default configuration function.
 
err_t c8800retro_write_reg (c8800retro_t *ctx, uint8_t reg, uint8_t data_in)
 8800 Retro write register function.
 
err_t c8800retro_read_reg (c8800retro_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 8800 Retro read register function.
 
err_t c8800retro_clear_display (c8800retro_t *ctx)
 8800 Retro clear display function.
 
err_t c8800retro_display_char (c8800retro_t *ctx, uint8_t char_index)
 8800 Retro display char function.
 
err_t c8800retro_display_image (c8800retro_t *ctx, uint8_t *p_image)
 8800 Retro display image function.
 
err_t c8800retro_display_string (c8800retro_t *ctx, uint8_t scroll_mode, uint16_t scroll_speed_ms, uint8_t *text)
 8800 Retro display string function.
 
uint8_t c8800retro_get_int_pin (c8800retro_t *ctx)
 8800 Retro get int pin function.
 
err_t c8800retro_clear_interrupt (c8800retro_t *ctx)
 8800 Retro clear interrupt function.
 
err_t c8800retro_get_keypad (c8800retro_t *ctx, uint16_t *keypad)
 8800 Retro get keypad function.
 

Detailed Description

API for configuring and manipulating 8800 Retro Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ c8800retro_cfg_setup()

void c8800retro_cfg_setup ( c8800retro_cfg_t * cfg)

8800 Retro configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See c8800retro_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ c8800retro_clear_display()

err_t c8800retro_clear_display ( c8800retro_t * ctx)

8800 Retro clear display function.

This function clears the display by writing zeros to all digit registers.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_clear_interrupt()

err_t c8800retro_clear_interrupt ( c8800retro_t * ctx)

8800 Retro clear interrupt function.

This function clears all interrupts by reading KEYA and KEYB registers.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_default_cfg()

err_t c8800retro_default_cfg ( c8800retro_t * ctx)

8800 Retro default configuration function.

This function executes a default configuration of 8800 Retro click board.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ c8800retro_display_char()

err_t c8800retro_display_char ( c8800retro_t * ctx,
uint8_t char_index )

8800 Retro display char function.

This function displays a single character from the predefined charset (IBM BIOS 8x8 font array).

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]char_index: 0-31,127 : Code page 437, cf. https://en.wikipedia.org/wiki/Code_page_437 32-126 : ASCII 160-255 : ISO-8859-1, cf. https://en.wikipedia.org/wiki/ISO/IEC_8859-1
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_display_image()

err_t c8800retro_display_image ( c8800retro_t * ctx,
uint8_t * p_image )

8800 Retro display image function.

This function displays an image (array of 8 bytes) on the LED matrix.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]p_image: Pointer to image buffer (array of 8 bytes).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_display_string()

err_t c8800retro_display_string ( c8800retro_t * ctx,
uint8_t scroll_mode,
uint16_t scroll_speed_ms,
uint8_t * text )

8800 Retro display string function.

This function scrolls a desired string on LEDs.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]scroll_mode:
  • 0 - Horizontal left.
  • 1 - Horizontal right.
  • 2 - Vertical up.
  • 3 - Vertical down.
[in]scroll_speed_ms: Scroll speed in miliseconds.
[in]text: Text string (up to 32 characters).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_get_int_pin()

uint8_t c8800retro_get_int_pin ( c8800retro_t * ctx)

8800 Retro get int pin function.

This function returns the INT pin logic state.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ c8800retro_get_keypad()

err_t c8800retro_get_keypad ( c8800retro_t * ctx,
uint16_t * keypad )

8800 Retro get keypad function.

This function reads KEYA and KEYB registers and stores the register's inverted value to the keypad variable.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[out]keypad: KEYx register content inverted.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
Refer to 8800 Retro keypad flags definition.

◆ c8800retro_init()

err_t c8800retro_init ( c8800retro_t * ctx,
c8800retro_cfg_t * cfg )

8800 Retro initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See c8800retro_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_read_reg()

err_t c8800retro_read_reg ( c8800retro_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

8800 Retro read register function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c8800retro_write_reg()

err_t c8800retro_write_reg ( c8800retro_t * ctx,
uint8_t reg,
uint8_t data_in )

8800 Retro write register function.

This function writes a byte of data to the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See c8800retro_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.