WebRadioApp  0.1
MAIN
Collaboration diagram for MAIN:

Modules

 MAIN_Variables_for_USB_Memory_Stick_and_SD_Disk
 
 MAIN_Variables_for_Timers_and_Clock
 
 MAIN_Variables_for_Ethernet_and_netinterface
 
 MAIN_TLS_Extra_Buffer
 
 MAIN_Variables_for_MP3_decoding
 
 MAIN_Scratch_Variables
 
 MAIN_Private_function_prototypes
 

Macros

#define HSEM_ID_0   (0U) /* HW semaphore 0*/
 

Functions

int fputc (int ch, FILE *f)
 
FRESULT scan_files (char *path)
 Scan files. More...
 
void HAL_TIM_PeriodElapsedCallback (TIM_HandleTypeDef *htim)
 TIM HAL for Clock. More...
 
int main (void)
 Main function. More...
 
void Error_Handler (void)
 This function is executed in case of error occurrence. More...
 

Variables

SD_HandleTypeDef hsd1
 
TIM_HandleTypeDef htim1
 
RNG_HandleTypeDef hrng
 

Variables for USB Memory Stick and SD Disk

ApplicationTypeDef Appli_state
 
FRESULT res
 
FRESULT res0
 
FRESULT res1
 
FRESULT res2 = FR_OK
 
char buff1 [6]
 
FATFS * fs
 
DWORD fre_clust
 
DWORD fre_sect
 
DWORD tot_sect
 

Variables for Timers and Clock

int XTAL_Min
 
int XTAL_Min1
 
int XTAL_Min2
 
int XTAL_Hour
 
int XTAL_Sec
 
int XTAL_Sec1
 
int XTAL_Sec2
 
int XTAL_Day
 
int XTAL_Month
 
int XTAL_Year
 
int XTAL_Weekday
 
int XTAL_MESZ
 
int First_XTAL_Min
 
int First_XTAL_Hour
 
int Leap_year
 
int XTAL_MSEC
 

Variables for Ethernet and Network Interface

struct netif gnetif
 
unsigned long ulIPAddress
 
unsigned long ulIPAddress1
 
unsigned long ulIPAddress2
 
unsigned long ulIPAddress3 = 0
 
unsigned long ulGWAddress
 
unsigned long ulNMAddress
 
unsigned long ulIPv6Address
 
unsigned long ulIPv6Address1
 
unsigned long ulIPv6Address2
 
unsigned long ulIPv6Address3 = 0
 

Variables for MP3 decoding

HMP3Decoder hMP3Decoder
 
uint8_t initialaudiovolume
 

Scratch Variables

char s4 [80]
 
char connectionInfo [80]
 
int timeout = 0
 
volatile uint64_t MS_TIMER1
 
ip_addr_t CurrNTPserver
 

function prototypes

static void MX_GPIO_Init (void)
 GPIO Initialization Function. More...
 
static void MX_TIM1_Init (void)
 TIM1 Initialization Function. More...
 
static void MX_SDMMC1_SD_Init (void)
 SDMMC1 Initialization Function. More...
 
static void MX_RNG_Init (void)
 RNG Initialization Function. More...
 

Detailed Description

Macro Definition Documentation

◆ HSEM_ID_0

#define HSEM_ID_0   (0U) /* HW semaphore 0*/

Function Documentation

◆ Error_Handler()

void Error_Handler ( void  )

This function is executed in case of error occurrence.

Return values
None
Here is the caller graph for this function:

◆ fputc()

int fputc ( int  ch,
FILE *  f 
)

References EwBspConsolePutCharacter(), and void().

Here is the call graph for this function:

◆ HAL_TIM_PeriodElapsedCallback()

void HAL_TIM_PeriodElapsedCallback ( TIM_HandleTypeDef *  htim)

TIM HAL for Clock.

Parameters
htimTIM Time Base Handle Structure definition

References MS_TIMER1, XTAL_Day, XTAL_Hour, XTAL_Min, XTAL_MSEC, and XTAL_Sec.

◆ main()

int main ( void  )

Main function.

Returns
Zero if successful.

Mount SD Disk (driver linking already done in FATFS init)


Check if there is a USB mass storage device (USB stick) present wait for Appli_state = READY (in usb_host.h) OR timeout == 2 s


Intitialize USB Disk if Ready (linking laready done in FATFS init)


Check for DHCP Success and wait and send first NTP Command


References TcpClient::adjustBuffer(), TcpClient::analysisOfMetaInfo(), Appli_state, APPLICATION_READY, BSP_SD_IsDetected(), buff1, connectionInfo, CurrNTPserver, err, Error_Handler(), EwBspClockSetTime(), EwBspConsoleDone(), EwBspConsoleInit(), EwBspSystemDone(), EwDone(), EwInit(), EwPrintSystemInfo(), EwProcess(), fre_clust, fre_sect, fs, TcpClient::gateActivities(), Mp3Player::getEtherAndBuffer(), Radio::getIPv4Address(), Radio::getIPv4AddressUint(), Radio::getIPv6Address(), Radio::getIPv6AddressUint(), gnetif, hMP3Decoder, HSEM_ID_0, htim1, init_station_DNS(), initialaudiovolume, IPv6_LOCAL_LINK_ADDR, IPv6_UNIQUE_LOCAL_ADDR, LOCAL_IPv4, Radio::m_connectionTcp, Radio::m_mp3, MPU_Config(), MS_TIMER1, MX_FATFS_Init(), MX_GPIO_Init(), MX_LWIP_Init(), MX_RNG_Init(), MX_SDMMC1_SD_Init(), MX_TIM1_Init(), MX_USB_HOST_Init(), MX_USB_HOST_Process(), NTP_init(), Radio::printIPv4Addresses(), Radio::printIPv6Addresses(), TcpClient::process(), res, res1, res2, retSD, retUSBH, scan_files(), SDFatFS, SDFile, SDPath, sendNTP(), SSI_Tags, SSICallback(), Radio::status, SystemClock_Config(), SystemCoreClock, timeout, tot_sect, ulIPAddress, ulIPAddress1, ulIPAddress2, TcpClient::updateStation(), USBHFatFS, USBHFile, USBHPath, and XTAL_Sec.

Here is the call graph for this function:

◆ MX_GPIO_Init()

static void MX_GPIO_Init ( void  )
static

GPIO Initialization Function.

Parameters
None
Return values
None
Here is the caller graph for this function:

◆ MX_RNG_Init()

static void MX_RNG_Init ( void  )
static

RNG Initialization Function.

Parameters
None
Return values
None

References Error_Handler(), and hrng.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_SDMMC1_SD_Init()

static void MX_SDMMC1_SD_Init ( void  )
static

SDMMC1 Initialization Function.

Parameters
None
Return values
None

References Error_Handler(), and hsd1.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_TIM1_Init()

static void MX_TIM1_Init ( void  )
static

TIM1 Initialization Function.

Parameters
None
Return values
None

References Error_Handler(), and htim1.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scan_files()

FRESULT scan_files ( char *  path)

Scan files.

Parameters
pathStart node to be scanned (also used as work area)
Returns
FRESULT

References res.

Here is the caller graph for this function:

Variable Documentation

◆ Appli_state

ApplicationTypeDef Appli_state

◆ buff1

char buff1[6]

temporary for path name

◆ connectionInfo

char connectionInfo[80]

◆ CurrNTPserver

ip_addr_t CurrNTPserver

Variable for NTP service

◆ First_XTAL_Hour

int First_XTAL_Hour

◆ First_XTAL_Min

int First_XTAL_Min

◆ fre_clust

DWORD fre_clust

◆ fre_sect

DWORD fre_sect

◆ fs

FATFS* fs

◆ gnetif

struct netif gnetif

◆ hMP3Decoder

HMP3Decoder hMP3Decoder

◆ hrng

RNG_HandleTypeDef hrng

RNG handle Structure definition

◆ hsd1

SD_HandleTypeDef hsd1

SD handle Structure definition

◆ htim1

TIM_HandleTypeDef htim1

TIM handle Structure definition

◆ initialaudiovolume

uint8_t initialaudiovolume

◆ Leap_year

int Leap_year

◆ MS_TIMER1

volatile uint64_t MS_TIMER1

Detailed description after the member

◆ res

FRESULT res

◆ res0

FRESULT res0

◆ res1

FRESULT res1

◆ res2

FRESULT res2 = FR_OK

◆ s4

char s4[80]

◆ timeout

int timeout = 0

◆ tot_sect

DWORD tot_sect

◆ ulGWAddress

unsigned long ulGWAddress

◆ ulIPAddress

unsigned long ulIPAddress

◆ ulIPAddress1

unsigned long ulIPAddress1

◆ ulIPAddress2

unsigned long ulIPAddress2

◆ ulIPAddress3

unsigned long ulIPAddress3 = 0

◆ ulIPv6Address

unsigned long ulIPv6Address

◆ ulIPv6Address1

unsigned long ulIPv6Address1

◆ ulIPv6Address2

unsigned long ulIPv6Address2

◆ ulIPv6Address3

unsigned long ulIPv6Address3 = 0

◆ ulNMAddress

unsigned long ulNMAddress

◆ XTAL_Day

int XTAL_Day

◆ XTAL_Hour

int XTAL_Hour

◆ XTAL_MESZ

int XTAL_MESZ

◆ XTAL_Min

int XTAL_Min

◆ XTAL_Min1

int XTAL_Min1

◆ XTAL_Min2

int XTAL_Min2

◆ XTAL_Month

int XTAL_Month

◆ XTAL_MSEC

int XTAL_MSEC

◆ XTAL_Sec

int XTAL_Sec

◆ XTAL_Sec1

int XTAL_Sec1

◆ XTAL_Sec2

int XTAL_Sec2

◆ XTAL_Weekday

int XTAL_Weekday

◆ XTAL_Year

int XTAL_Year