webradio/userif.c File Reference


Detailed Description

User interface.

 *
 * $Log$
 *
 * 

Definition in file userif.c.

Go to the source code of this file.

Defines

#define UI_THREAD_STACK   2048
#define UI_REFRESH_RATE   300
#define LCD_VCOLS   160
 Number of virtual columns.
#define LCD_SCROLL_GAP   (LCD_COLS / 2)

Functions

static void DisplayRefresh (void)
 Refresh the LCD.
static void UserIfShowStationConf (RADIOSTATION *scp)
 Displays configured information about a station.
static void UserIfShowStationInfo (STATIONINFO *sip)
 Displays station information.
static void UserIfMainMenu (void)
 Main menu processing.
void UserIfThread (void *arg)
 Background thread for user interface.
void UserIfShowMessage (u_char row, u_char secs, CONST char *fmt,...)
 Display a specified text.
void UserIfShowStatus (u_char status)
 Display a specified status.
char * UserIfGetDisplayText (char *buff, size_t siz)
 Retrieve the current display text.
int UserIfInit (char *name)
 Start background thread for display updates.

Variables

static DISPLAYINFO display


Define Documentation

#define UI_THREAD_STACK   2048

Definition at line 75 of file userif.c.

Referenced by UserIfInit().

#define UI_REFRESH_RATE   300

Definition at line 80 of file userif.c.

Referenced by UserIfMainMenu(), UserIfShowMessage(), and UserIfThread().

#define LCD_VCOLS   160

Number of virtual columns.

Contents will be scrolled, if it doesn't fit on a single LCD line.

Definition at line 93 of file userif.c.

Referenced by UserIfShowStationConf(), UserIfShowStationInfo(), and UserIfShowStatus().

#define LCD_SCROLL_GAP   (LCD_COLS / 2)

Definition at line 124 of file userif.c.

Referenced by DisplayRefresh().


Function Documentation

static void DisplayRefresh ( void   )  [static]

Refresh the LCD.

Definition at line 131 of file userif.c.

References display, and LCD_SCROLL_GAP.

Referenced by UserIfMainMenu(), and UserIfThread().

static void UserIfShowStationConf ( RADIOSTATION scp  )  [static]

Displays configured information about a station.

Parameters:
scp Pointer to the configuration table entry.

Definition at line 201 of file userif.c.

References display, LCD_VCOLS, and RADIOSTATION::rs_name.

Referenced by UserIfMainMenu(), UserIfShowStationInfo(), and UserIfShowStatus().

static void UserIfShowStationInfo ( STATIONINFO sip  )  [static]

Displays station information.

Called during connect.

Parameters:
sip Information structure of the connected station.

Definition at line 216 of file userif.c.

References display, LCD_VCOLS, STATIONINFO::si_name, STATIONINFO::si_scp, and UserIfShowStationConf().

Referenced by UserIfShowStatus().

Here is the call graph for this function:

UserIfShowStationConf

static void UserIfMainMenu ( void   )  [static]

Main menu processing.

Definition at line 233 of file userif.c.

References ButtonRead(), display, DisplayRefresh(), favlist, FavListCopy(), FavListSearch(), KEYCODE_DOWN, KEYCODE_SELECT, KEYCODE_UP, TOP_FAVORITE, UI_REFRESH_RATE, UserIfShowMessage(), and UserIfShowStationConf().

Referenced by UserIfThread().

Here is the call graph for this function:

ButtonReadDisplayRefreshFavListCopyFavListSearchUserIfShowMessageUserIfShowStationConf

void UserIfThread ( void *  arg  ) 

Background thread for user interface.

Parameters:
arg Unused. Should be NULL.

Definition at line 281 of file userif.c.

References ButtonRead(), display, DisplayRefresh(), KEYCODE_DOWN, KEYCODE_SELECT, KEYCODE_UP, LOG_ERROR, LogMsg(), RECEIVERINFO::ri_decoder, UI_REFRESH_RATE, UserIfMainMenu(), UserIfShowMessage(), webradio, WEBRADIO::wr_cfgupd, WEBRADIO::wr_gain, WEBRADIO::wr_rip, and XmlRefresh().

Referenced by UserIfInit().

Here is the call graph for this function:

ButtonReadDisplayRefreshLogMsgUserIfMainMenuUserIfShowMessageXmlRefreshFavListCopyFavListSearchUserIfShowStationConf

void UserIfShowMessage ( u_char  row,
u_char  secs,
CONST char *  fmt,
  ... 
)

Display a specified text.

Parameters:
row Row position of the message.
secs Number of seconds to display the message. Set to 0 for permanent display.
fmt Format string containing conversion specifications.

Definition at line 331 of file userif.c.

Referenced by UserIfMainMenu(), UserIfShowStatus(), and UserIfThread().

void UserIfShowStatus ( u_char  status  ) 

Display a specified status.

Parameters:
status Status to be displayed.

Definition at line 349 of file userif.c.

Referenced by main(), ProcessMetaData(), ShoutCastThread(), and UserIfInit().

char* UserIfGetDisplayText ( char *  buff,
size_t  siz 
)

Retrieve the current display text.

Parameters:
buff The text is store here.
siz Size of the buffer.
Returns:
Pointer to the buffer.

Definition at line 396 of file userif.c.

Referenced by XmlProcessReports().

int UserIfInit ( char *  name  ) 

Start background thread for display updates.

Parameters:
name Display device name.
Returns:
0 on success or -1 in case of a failure.

Definition at line 427 of file userif.c.

Referenced by main().


Variable Documentation

DISPLAYINFO display [static]

Definition at line 119 of file userif.c.

Referenced by DisplayRefresh(), UserIfGetDisplayText(), UserIfInit(), UserIfMainMenu(), UserIfShowMessage(), UserIfShowStationConf(), UserIfShowStationInfo(), UserIfShowStatus(), and UserIfThread().


© 2008 by egnite GmbH - visit www.ethernut.de