Speeduino
Loading...
Searching...
No Matches
Macros | Functions | Variables
board_definition.h File Reference

Inclusion of board specific header files and board related definitions. More...

#include <stdint.h>
#include <type_traits>
#include <limits>
#include <Arduino.h>
#include "storage_api.h"

Go to the source code of this file.

Macros

#define SET_COMPARE(compare, value)   (compare) = (COMPARE_TYPE)(value)
 

Functions

void initBoard (uint32_t baudRate)
 Initialise the board, including USB comms.
 
void boardInitPins (uint8_t boardID, pinNumbers_t &pins)
 Pin specific initialisation (optional - can be empty)
 
uint16_t freeRam (void)
 Calculate free RAM for display in TunerStudio.
 
void doSystemReset (void)
 Reset the board (optional)
 
void jumpToBootloader (void)
 Trigger the boot loader (optional)
 
uint8_t getSystemTemp (void)
 Get the board temp for display in TunerStudio (optional)
 
storage_api_t getBoardStorageApi (void)
 Get the storage API for the board.
 
uint8_t getPwmTimerResolution (void)
 Get the PWM timer resolution in uS.
 

Variables

constexpr uint32_t MAX_TIMER_PERIOD = ticksToMicros((std::numeric_limits<COMPARE_TYPE>::max)())
 The longest period of time (in uS) that the timer can permit.
 
constexpr uint8_t NOT_A_PIN = UINT8_MAX
 

Detailed Description

Inclusion of board specific header files and board related definitions.

Note
This file should be named "board.h", but one of the STM32 Arduino implementations has a <board.h> include. Which picks up this file instead of the intended file :-(

Macro Definition Documentation

◆ SET_COMPARE

#define SET_COMPARE (   compare,
  value 
)    (compare) = (COMPARE_TYPE)(value)

Function Documentation

◆ boardInitPins()

void boardInitPins ( uint8_t  boardID,
pinNumbers_t pins 
)

Pin specific initialisation (optional - can be empty)

This is called after the pins are assigned and therefore after initBoard()

◆ doSystemReset()

void doSystemReset ( void  )

Reset the board (optional)

◆ freeRam()

uint16_t freeRam ( void  )

Calculate free RAM for display in TunerStudio.

◆ getBoardStorageApi()

storage_api_t getBoardStorageApi ( void  )

Get the storage API for the board.

◆ getPwmTimerResolution()

uint8_t getPwmTimerResolution ( void  )

Get the PWM timer resolution in uS.

◆ getSystemTemp()

uint8_t getSystemTemp ( void  )

Get the board temp for display in TunerStudio (optional)

◆ initBoard()

void initBoard ( uint32_t  baudRate)

Initialise the board, including USB comms.

This is called after the tune is loaded from EEPROM, but before pins are assigned.

Parameters
baudRateThe Serial comms baud rate

◆ jumpToBootloader()

void jumpToBootloader ( void  )

Trigger the boot loader (optional)

Variable Documentation

◆ MAX_TIMER_PERIOD

constexpr uint32_t MAX_TIMER_PERIOD = ticksToMicros((std::numeric_limits<COMPARE_TYPE>::max)())
constexpr

The longest period of time (in uS) that the timer can permit.

◆ NOT_A_PIN

constexpr uint8_t NOT_A_PIN = UINT8_MAX
constexpr