InES Hardware Abstraction Layer
Enumerations | Functions
hal_ct_seg7.h File Reference

Interface of module hal_ct_seg7. More...

#include <stdint.h>

Go to the source code of this file.

Enumerations

enum  hal_ct_seg7_t { HAL_CT_SEG7_DS0 = 0u, HAL_CT_SEG7_DS1 = 8u, HAL_CT_SEG7_DS2 = 16u, HAL_CT_SEG7_DS3 = 24u }
 Defines the 7 segment displays on the CT-Board.
 
enum  hal_ct_seg7_segment_t {
  HAL_CT_SEG7_SEGA = 0x01, HAL_CT_SEG7_SEGB = 0x02, HAL_CT_SEG7_SEGC = 0x04, HAL_CT_SEG7_SEGD = 0x08,
  HAL_CT_SEG7_SEGE = 0x10, HAL_CT_SEG7_SEGF = 0x20, HAL_CT_SEG7_SEGG = 0x40, HAL_CT_SEG7_SEGDP = 0x80
}
 Defines the segments on a 7 segment display.
 

Functions

void hal_ct_seg7_raw_write (hal_ct_seg7_t display, uint8_t segment)
 Writes segment data to specified 7 segment display. More...
 
void hal_ct_seg7_bin_write (uint16_t value)
 Outputs a 16 bit value in hexadecimal represenation on the seven-segment display. More...
 
void hal_ct_seg7_clear (hal_ct_seg7_t display)
 Clear all segments on the specified display. More...
 
void hal_ct_seg7_clear_all (void)
 Clear all segments on all displays.
 
void hal_ct_seg7_dot_set (hal_ct_seg7_t display)
 Set dot on specified displays. More...
 
void hal_ct_seg7_dot_clear (hal_ct_seg7_t display)
 Reset dot on specified displays. More...
 
uint8_t hal_ct_seg7_get_bcd (uint8_t value)
 Converts binary value to bcd. More...
 
uint8_t hal_ct_seg7_get_seg7 (uint8_t value)
 Converts binary value to 7 segment code. More...
 

Detailed Description

Interface of module hal_ct_seg7.

$Id$

Function Documentation

◆ hal_ct_seg7_bin_write()

void hal_ct_seg7_bin_write ( uint16_t  value)

Outputs a 16 bit value in hexadecimal represenation on the seven-segment display.

Parameters
value: 16 bit binary value to display.

◆ hal_ct_seg7_clear()

void hal_ct_seg7_clear ( hal_ct_seg7_t  display)

Clear all segments on the specified display.

Parameters
display: Display to clear.

◆ hal_ct_seg7_dot_clear()

void hal_ct_seg7_dot_clear ( hal_ct_seg7_t  display)

Reset dot on specified displays.

Parameters
display: Display to reset the dot.

◆ hal_ct_seg7_dot_set()

void hal_ct_seg7_dot_set ( hal_ct_seg7_t  display)

Set dot on specified displays.

Parameters
display: Display to set the dot.

◆ hal_ct_seg7_get_bcd()

uint8_t hal_ct_seg7_get_bcd ( uint8_t  value)

Converts binary value to bcd.

Parameters
value: Binary value to convert.
Returns
Converted bcd value. The max. bcd value that can be displayed with 8bit is 99u.

◆ hal_ct_seg7_get_seg7()

uint8_t hal_ct_seg7_get_seg7 ( uint8_t  value)

Converts binary value to 7 segment code.

Parameters
value: Binary value to convert (4 bit).
Returns
Converted 7 segment code of 0xf if array index is out of bounds. Else converted 7 segment code of value.

◆ hal_ct_seg7_raw_write()

void hal_ct_seg7_raw_write ( hal_ct_seg7_t  display,
uint8_t  segment 
)

Writes segment data to specified 7 segment display.

Parameters
display: The display on which shall be written.
segment: The segments, can be combined => SEGB | SEGC => 1.