-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsevseg_display.h
72 lines (56 loc) · 1.07 KB
/
sevseg_display.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
# Header file for the 7 segment display peripheral
#
#
*/
#ifndef _SEVSEG_DISPLAY_H_
#define _SEVSEG_DISPLAY_H_
#include "miniat/miniat.h"
#include "SDL/edison_seven_segment.h"
typedef struct sevseg_display sevseg_display;
/*
#Creates a new 7 segment display peripheral, setting it's address
#to "address" for the miniAT
#
#
#
*/
extern sevseg_display *sevseg_display_new(m_uword address);
/*
#Free's the memory address for the 7 segment display passed
#as argument
#
#
#
*/
extern void sevseg_display_free(sevseg_display *display);
/*
#Clock function
#
#This will update the current value for the 7 segment display pins
#
#
*/
extern void sevseg_display_clock(edison_sevenseg *sevseg, sevseg_display *display);
/*
#Tries to connect the 7 segment display with the bus
#
#
#
#
*/
extern void sevseg_display_bus_connector_set(sevseg_display *display, m_bus *bus);
/*
# Sets the seven segment display bus
#
#
#
#
*/
extern void sevseg_display_set_bus(sevseg_display *display, m_bus bus);
/*
* Converts Decimal to Binary
*
*/
int *decimal_to_binary (int segment_data);
#endif