Stepper-Motor-Control
v3.0.0
System on a Chip 2014 - Group 04
|
Functions for accessing hardware connected through pio´s and registers. More...
#include <stdint.h>
#include <system.h>
#include <altera_avalon_pio_regs.h>
Go to the source code of this file.
Macros | |
#define | PIO_KEY_RS_IR0_MSK (0b0001) |
Run/Stop mask for PIO-Key. | |
#define | PIO_KEY_MINUS_IR2_MSK (0b0100) |
Increase steps mask for PIO-Key. | |
#define | PIO_KEY_PLUS_IR3_MSK (0b1000) |
Decreses steps mask for PIO-Key. | |
#define | PIO_SW_LR_MSK (0b0000000001) |
Left/Right mask for PIO-Switches. | |
#define | PIO_SW_MODE_MSK (0b0000011110) |
Mode mask for PIO-Switches. | |
#define | PIO_SW_DEBUG_MSK (0b1000000000) |
Debug mask for PIO-Switches. | |
Functions | |
keys | |
static __inline__ void | PIO_KEY_SetIRMsk (uint32_t enablebits) |
Function to enable interrupts for pio key. More... | |
static __inline__ void | PIO_KEY_ClearEdgeCptBits (uint32_t clearbits) |
Function to clear bits of keys edgecapture register. More... | |
static __inline__ uint32_t | PIO_KEY_GetEdgeCpt (void) |
Function to read content of keys edgecapture register. More... | |
sliding switches | |
static __inline__ void | PIO_SW_SetIRMsk (uint32_t enablebits) |
Function to enable interrupts for pio sw. More... | |
static __inline__ void | PIO_SW_ClearEdgeCptBits (uint32_t clearbits) |
Function to clear bits of switches edgecapture register. More... | |
static __inline__ uint32_t | PIO_SW_GetValues (void) |
Function to read content of switches data register. More... | |
red LED_9 (heartbeat) | |
static __inline__ void | PIO_LED9_Set (uint32_t ledValue) |
Function to set led9 for heartbeat. More... | |
7-segment hex displays | |
static __inline__ void | PIO_HEX0_Set (uint32_t segmentValues) |
Function to set segments on hex0 display. More... | |
static __inline__ void | PIO_HEX1_Set (uint32_t segmentValues) |
Function to set segments on hex1 display. More... | |
static __inline__ void | PIO_HEX2_Set (uint32_t segmentValues) |
Function to set segments on hex2 display. More... | |
static __inline__ void | PIO_HEX3_Set (uint32_t segmentValues) |
Function to set segments on hex3 display. More... | |
Functions for accessing hardware connected through pio´s and registers.
v0.1.0 21.10.2014 Riedel & Kossmann
v0.1.1 29.10.2014 Kossmann
v0.1.2 31.10.2014 Riedel & Kossmann
v1.0.0 31.10.2014 Kossmann
Definition in file hardwareAccess.h.
|
static |
Function to set segments on hex0 display.
segmentValues | : Values for all seven segments
|
none |
Definition at line 125 of file hardwareAccess.h.
|
static |
Function to set segments on hex1 display.
segmentValues | : Values for all seven segments
|
none |
Definition at line 136 of file hardwareAccess.h.
|
static |
Function to set segments on hex2 display.
segmentValues | : Values for all seven segments
|
none |
Definition at line 147 of file hardwareAccess.h.
|
static |
Function to set segments on hex3 display.
segmentValues | : Values for all seven segments
|
none |
Definition at line 158 of file hardwareAccess.h.
|
static |
Function to clear bits of keys edgecapture register.
clearbits | : set bits to 1 for enable interrupt |
none |
Definition at line 55 of file hardwareAccess.h.
|
static |
Function to read content of keys edgecapture register.
pressedKeys | : When edge was detected, bit is 1 |
Definition at line 63 of file hardwareAccess.h.
|
static |
Function to enable interrupts for pio key.
enablebits | : set bits to 1 for enable interrupt |
None |
Definition at line 46 of file hardwareAccess.h.
|
static |
Function to set led9 for heartbeat.
ledValue | : Value for LED9
|
none |
Definition at line 110 of file hardwareAccess.h.
|
static |
Function to clear bits of switches edgecapture register.
clearbits | : set bits to 1 for clearing interrupt |
none |
Definition at line 85 of file hardwareAccess.h.
|
static |
Function to read content of switches data register.
switchesValues | : Values of all switches
|
Definition at line 95 of file hardwareAccess.h.
|
static |
Function to enable interrupts for pio sw.
enablebits | : set bits to 1 for enable interrupt |
None |
Definition at line 76 of file hardwareAccess.h.