Open FFBoard
Open source force feedback firmware
cppmain.h File Reference

Go to the source code of this file.

Functions

void cppmain ()
 
void usb_init ()
 
void tudThread (void *argument)
 
static bool inIsr ()
 
template<class T , class C >
int8_t cliptest (T v, C l, C h)
 
template<class T , class C >
clip (T v, C l, C h)
 
uint32_t micros ()
 
unsigned long getRunTimeCounterValue (void)
 
void refreshWatchdog ()
 

Function Documentation

◆ clip()

template<class T , class C >
T clip ( v,
C  l,
C  h 
)

Definition at line 58 of file cppmain.h.

◆ cliptest()

template<class T , class C >
int8_t cliptest ( v,
C  l,
C  h 
)

Definition at line 46 of file cppmain.h.

◆ cppmain()

void cppmain ( )

Firmware is not intended for this chip! This can be caused by accidentially flashing an incorrect firmware file and likely screws up clock and pin configs Do not proceed.

Definition at line 30 of file cppmain.cpp.

◆ getRunTimeCounterValue()

unsigned long getRunTimeCounterValue ( void  )

Helper function for RTOS run time measurements Should return a reasonably accurate and large counter value

Definition at line 144 of file cppmain.cpp.

◆ inIsr()

static bool inIsr ( )
inlinestatic

Definition at line 41 of file cppmain.h.

◆ micros()

uint32_t micros ( )

TIM_MICROS_HALTICK MUST be reset by the HAL tick OR be the same tick timer to count microseconds since last tick update. By default ST HAL initializes the tick timer with 1MHz and 1kHz overrun interrupts so TIM_MICROS_HALTICK can be defined as that timer. Alternatively an actual freerunning 32b can be defined as TIM_MICROS to use its count directly. Otherwise the cyclecounter is used.

Definition at line 116 of file cppmain.cpp.

◆ refreshWatchdog()

void refreshWatchdog ( )

Definition at line 103 of file cppmain.cpp.

◆ tudThread()

void tudThread ( void *  argument)

◆ usb_init()

void usb_init ( )