hsk-libs-dev
270
High Speed Karlsruhe XC878 library collection
|
Simple test file that is not linked into the library. More...
#include <Infineon/XC878.h>
#include "config.h"
#include "hsk_boot/hsk_boot.h"
#include "hsk_timers/hsk_timer01.h"
#include "hsk_can/hsk_can.h"
#include "hsk_icm7228/hsk_icm7228.h"
#include "hsk_adc/hsk_adc.h"
#include "hsk_pwm/hsk_pwm.h"
#include "hsk_pwc/hsk_pwc.h"
#include "hsk_flash/hsk_flash.h"
#include "hsk_wdt/hsk_wdt.h"
#include "hsk_io/hsk_io.h"
Data Structures | |
struct | hsk_flash_struct |
This struct is a template for data that can be written to the D-Flash. More... | |
Macros | |
#define | PERSIST_VERSION 1 |
The version of the persist struct. More... | |
Functions | |
void | p1_init (void) |
Set up buffer and ports for display driver at I/O port P1 . More... | |
void | p1_refresh (void) |
Reflesh displays at I/O port P1 with the buffered data. More... | |
void | p1_writeString (char const *const str, ubyte const pos, ubyte const len) |
Write an ASCII encoded string into p1_buffer. More... | |
void | p1_writeDec (uword const value, char const power, ubyte const pos, ubyte const len) |
Write a decimal number into p1_buffer. More... | |
void | p1_writeHex (uword const value, char const power, ubyte const pos, ubyte const len) |
Write a hexadecimal number into p1_buffer. More... | |
void | p1_illuminate (ubyte const segments, ubyte const pos, ubyte const len) |
Illuminate a number of segments in p1_buffer. More... | |
void | main (void) |
Call init functions and invoke the run routine. More... | |
void | init (void) |
Initialize ports, timers and ISRs. More... | |
void | run (void) |
The main test code body. More... | |
void | tick0 (void) |
A ticking function called back by the timer T0 ISR. More... | |
Variables | |
ubyte | p1_buffer [8] |
Buffer for display driver at I/O port P1 . More... | |
volatile struct hsk_flash_struct | persist |
This structure is used to persist data between resets. More... | |
volatile uword | tick0_count_250 = 0 |
A counter used to detecting that 250ms have passed. More... | |
volatile ubyte | tick0_count_20 = 10 |
A counter used to detecting that 20ms have passed. More... | |
volatile uword | adc7 |
The storage variable for the potentiometer on the eval board. More... | |
Simple test file that is not linked into the library.
This file is normally rigged to run on the XC800 Starter Kit eval board and used for testing whatever code is currently under development.
#define PERSIST_VERSION 1 |
The version of the persist struct.
void init | ( | void | ) |
Initialize ports, timers and ISRs.
void main | ( | void | ) |
Call init functions and invoke the run routine.
|
inline |
Illuminate a number of segments in p1_buffer.
segments | The number of segments to illuminate |
pos | The target position in the buffer |
len | The number of digits available to encode the number |
void p1_init | ( | void | ) |
Set up buffer and ports for display driver at I/O port P1 .
void p1_refresh | ( | void | ) |
Reflesh displays at I/O port P1 with the buffered data.
|
inline |
Write a decimal number into p1_buffer.
value | The number to encode |
power | The 10 base power of the number to encode |
pos | The target position in the buffer |
len | The number of digits available to encode the number |
|
inline |
Write a hexadecimal number into p1_buffer.
value | The number to encode |
power | The 16 base power of the number to encode |
pos | The target position in the buffer |
len | The number of digits available to encode the number |
|
inline |
Write an ASCII encoded string into p1_buffer.
str | The buffer to read the ASCII string from |
pos | The position in the buffer to write the encoded string to |
len | The target length of the encoded string |
void run | ( | void | ) |
The main test code body.
void tick0 | ( | void | ) |
A ticking function called back by the timer T0 ISR.
volatile uword adc7 |
The storage variable for the potentiometer on the eval board.
ubyte p1_buffer[8] |
Buffer for display driver at I/O port P1 .
persist |
This structure is used to persist data between resets.
volatile ubyte tick0_count_20 = 10 |
A counter used to detecting that 20ms have passed.
volatile uword tick0_count_250 = 0 |
A counter used to detecting that 250ms have passed.