SWE-350 TOTP Generator Milestone 5
The DE-10 board has six 7-segment displays, this can be used to display and generate a time based one-time pin (TOTP).
Loading...
Searching...
No Matches
7seg.c File Reference
#include "7seg.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <tgmath.h>
#include "../address_map_arm.h"
#include <assert.h>
Include dependency graph for 7seg.c:

Go to the source code of this file.

Macros

#define HW_REGS_BASE   ( ALT_STM_OFST )
 
#define HW_REGS_SPAN   ( 0x04000000 )
 
#define HW_REGS_MASK   ( HW_REGS_SPAN - 1 )
 

Variables

int fd = -1
 Used to open /dev/mem for access to physical addresses Not made by Erick Grant, copyright Terasic Inc.
 
void * virtual_base
 Base for the LCD Used to define the address of the LCD.
 
void * LW_virtual
 Used to map physical addresses for the light-weight bridge Not made by Erick Grant, copyright Terasic Inc.
 

Macro Definition Documentation

◆ HW_REGS_BASE

#define HW_REGS_BASE   ( ALT_STM_OFST )

Definition at line 15 of file 7seg.c.

◆ HW_REGS_MASK

#define HW_REGS_MASK   ( HW_REGS_SPAN - 1 )

Definition at line 17 of file 7seg.c.

◆ HW_REGS_SPAN

#define HW_REGS_SPAN   ( 0x04000000 )

Definition at line 16 of file 7seg.c.

Variable Documentation

◆ fd

int fd = -1

Used to open /dev/mem for access to physical addresses Not made by Erick Grant, copyright Terasic Inc.

Definition at line 18 of file 7seg.c.

◆ LW_virtual

void* LW_virtual

Used to map physical addresses for the light-weight bridge Not made by Erick Grant, copyright Terasic Inc.

Definition at line 30 of file 7seg.c.

◆ virtual_base

void* virtual_base

Base for the LCD Used to define the address of the LCD.

Definition at line 25 of file 7seg.c.