KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sys.h File Reference

System start up and management. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define IMAGETYPE   0
 

Functions

uint32_t sysSwDateRev ()
 Returns the Software date revision. More...
 
uint32_t sysHwDateRev ()
 Returns the Hardware date revision. More...
 
static uint8_t sysImageType ()
 Number identifying the image type. More...
 
void sysClearCrashDetect ()
 Clear crash detect. More...
 
void sysLoad (uint8_t *values)
 Gives the system load in percentage. More...
 
uint32_t sysPPSCount ()
 
void sysLogClearError (const char *doingWhat)
 Logs an error in the context of what the application is doing. More...
 
void sysBoardTemp (uint16_t *brdTemp, uint16_t *brdTempFrq)
 Returns the board temperature with a fractional part. More...
 
void _appInit ()
 Prototype to be implemented by higher-level function to start the application.
 
void coreDumpClear ()
 Clears core dump information.
 
void sysReboot ()
 Reboot the system. More...
 
void sysCrash ()
 

Detailed Description

System start up and management.

This actually has no useful functions yet, but secretly contains the main function.

Definition in file sys.h.

Function Documentation

void sysBoardTemp ( uint16_t *  brdTemp,
uint16_t *  brdTempFrq 
)

Returns the board temperature with a fractional part.

Parameters
brdTempTemperature in celcius.
brdTempFrqFractional part of the temperature.

Definition at line 380 of file sys.c.

void sysClearCrashDetect ( )

Clear crash detect.

No need to run this when the main-loop is running.

Definition at line 322 of file sys.c.

uint32_t sysHwDateRev ( )

Returns the Hardware date revision.

It has the following structure, hex encoded (e.g. December = 0x12) Bits 31-24: Year Bits 23-16: Month Bits 15-8 : Day Bits 7 -0 : Revision

Returns
The hardware date and revision hex encoded.

Definition at line 386 of file sys.c.

static uint8_t sysImageType ( )
inlinestatic

Number identifying the image type.

Returns

Definition at line 69 of file sys.h.

void sysLoad ( uint8_t *  values)

Gives the system load in percentage.

Provide array of 3 bytes in percentage (0-100).

Parameters
valuesArray of 3 bytes is filled with: 0 - time idle 1 - time used for executing tasks 2 - time used for executing IRQ's

Definition at line 373 of file sys.c.

void sysLogClearError ( const char *  doingWhat)

Logs an error in the context of what the application is doing.

Parameters
doingWhatMessage explaining what it was doing.

Definition at line 366 of file sys.c.

void sysReboot ( )

Reboot the system.

(soft reset).

Definition at line 515 of file sys.c.

uint32_t sysSwDateRev ( )

Returns the Software date revision.

It has the following structure, hex encoded (e.g. December = 0x12) Bits 31-24: Year Bits 23-16: Month Bits 15-8 : Day Bits 7 -0 : Revision

Returns
The software date and revision hex encoded.

Definition at line 391 of file sys.c.