This file implements an interface between an Embedded Wizard generated UI application and a certain device. Please consider this file only as template that is intended to show the binding between an UI application and the underlying system (e.g. middleware, BSP, hardware driver, protocol, ...). More...
#include "ewrte.h"
#include "ew_bsp_inout.h"
#include "ew_bsp_clock.h"
#include <stations.h>
#include <stdio.h>
#include <string.h>
#include "DeviceDriver.h"
#include "mp3player.h"
#include "Application.h"
Data Structures | |
struct | Cells |
Functions | |
void | HardButtonIsrCallback (int aButtonPresssed) |
Callback function for the hardware button. This function is called every time the hardware button is pressed or released. Please note, that this function is called from the interrupt service routine. More... | |
void | DeviceDriver_Initialize (void) |
The function DeviceDriver_Initialize() initializes the module and prepares all necessary things to access or communicate with the real device. The function has to be called from your main module, after the initialization of your GUI application. More... | |
void | DeviceDriver_Deinitialize (void) |
The function DeviceDriver_Deinitialize() deinitializes the module and finalizes the access or communication with the real device. The function has to be called from your main module, before the GUI application will be deinitialized. More... | |
int | DeviceDriver_ProcessData (void) |
The function DeviceDriver_ProcessData() is called from the main UI loop, in order to process data and events from your particular device. This function is responisble to update properties within the device class if the corresponding state or value of the real device has changed. This function is also responsible to trigger system events if necessary. More... | |
void | DeviceDriver_SetLedStatus (XInt32 aValue) |
This is a sample for a function called from the device class, when a property has changed. As a result, the corresponding value of the real device should be changed. In this implementation simply the LED is switched on or off. More... | |
void | DeviceDriver_PrintMessage (XString aText) |
This is a sample for a function that is called directly from a 'Command' method of the device class. As a result, the corresponding action should happen. In this implementation the given message is printed via the console interface. More... | |
void | DeviceDriver_SetTime (XUInt32 aTime) |
This is a sample for a function called from the device class, when the system time (RTC time) should be changed. More... | |
XString | ReadInfo (int toRead) |
Read information. It could be radio, connection, meta or station information. More... | |
void | UpdateVolume (int volume) |
Update Volume. More... | |
XString | InitStations () |
Initialize Stations. More... | |
int | GetXCounter () |
Get the x Counter of the station grid. More... | |
int | GetYCounter () |
Get the y Counter of the station grid. More... | |
int | GetCurrentID () |
Get the ID Counter of the station grid. More... | |
int | getLxValue (XInt32 index) |
Get the Lx Value object. More... | |
int | getLyValue (XInt32 index) |
Get the Ly Value object. More... | |
void | FFTCalculations (XInt32 inx, XInt32 *x, XInt32 *ly, XInt32 ll, XInt32 *ry, XInt32 rr, XInt32 height, XInt32 FFTGraph) |
Calculate FFT to display the graphics. More... | |
void | VUMeter (XFloat *angle_L, XFloat *angle_R) |
Volume unit meter. More... | |
void | SelectStationToPlay (XString aText) |
Print something out from the device when a station is selected. More... | |
Variables | |
Mp3Player * | mp3PlayerInstance |
volatile uint8_t | metainfo_present_LCD |
Audio Info Variables | |
volatile int | items |
char | radioInfo [240] |
char | connectionInfo [240] |
char | stationInfo [160] |
char | metaInfo [240] |
int | currentVolume |
Staions Variables | |
int | xCounter |
int | yCounter |
int | currentID |
int | initGrid = 1 |
int16_t | station_id |
Station Grid Variables | |
#define | Grid_X0 260 |
#define | Grid_Y0 200 |
#define | Grid_Width 450 |
#define | Grid_Height 240 |
#define | Cell_Width 50 |
#define | Cell_Height 40 |
#define | Num_Fields_X (Grid_Width / Cell_Width) |
#define | Num_Fields_Y (Grid_Height / Cell_Height) |
enum | info { Radio, Connection, StationInfo, Meta } |
typedef struct Cells | Cell |
Cell | matrixStations [Num_Fields_X][Num_Fields_Y] |
This file implements an interface between an Embedded Wizard generated UI application and a certain device. Please consider this file only as template that is intended to show the binding between an UI application and the underlying system (e.g. middleware, BSP, hardware driver, protocol, ...).
This file assumes to be the counterpart of the device class 'DeviceClass' within the unit 'Application'. In order to ensure that this file can be compiled for all projects with or without the device class, the generated define 'ApplicationDeviceClass' is used.