Speeduino
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
board_same51.h File Reference
#include "sam.h"

Go to the source code of this file.

Macros

#define CORE_SAME51
 
#define CORE_SAM
 
#define BOARD_MAX_DIGITAL_PINS   54
 
#define BOARD_MAX_IO_PINS   58
 
#define COMPARE_TYPE   uint16_t
 
#define SERIAL_BUFFER_SIZE   257
 
#define FPU_MAX_SIZE   32
 
#define EEPROM_LIB_H   "src/FlashStorage/FlashAsEEPROM.h"
 
#define RTC_LIB_H   "TimeLib.h"
 
#define pinIsReserved(pin)   ( ((pin) == 0) )
 
#define PIN_A6   (8ul)
 
#define PIN_A7   (9ul)
 
#define PIN_A8   (10ul)
 
#define PIN_A9   (11ul)
 
#define PIN_A13   (9ul)
 
#define PIN_A14   (9ul)
 
#define PIN_A15   (9ul)
 
#define INJ_CHANNELS   8
 
#define IGN_CHANNELS   8
 
#define FUEL1_COUNTER   TCC0->COUNT.reg
 
#define FUEL2_COUNTER   TCC0->COUNT.reg
 
#define FUEL3_COUNTER   TCC0->COUNT.reg
 
#define FUEL4_COUNTER   TCC0->COUNT.reg
 
#define FUEL5_COUNTER   TCC1->COUNT.reg
 
#define FUEL6_COUNTER   TCC1->COUNT.reg
 
#define FUEL7_COUNTER   TCC1->COUNT.reg
 
#define FUEL8_COUNTER   TCC1->COUNT.reg
 
#define IGN1_COUNTER   TCC1->COUNT.reg
 
#define IGN2_COUNTER   TCC1->COUNT.reg
 
#define IGN3_COUNTER   TCC2->COUNT.reg
 
#define IGN4_COUNTER   TCC2->COUNT.reg
 
#define IGN5_COUNTER   TCC1->COUNT.reg
 
#define IGN6_COUNTER   TCC1->COUNT.reg
 
#define IGN7_COUNTER   TCC2->COUNT.reg
 
#define IGN8_COUNTER   TCC2->COUNT.reg
 
#define FUEL1_COMPARE   TCC0->CC[0].bit.CC
 
#define FUEL2_COMPARE   TCC0->CC[1].bit.CC
 
#define FUEL3_COMPARE   TCC0->CC[2].bit.CC
 
#define FUEL4_COMPARE   TCC0->CC[3].bit.CC
 
#define FUEL5_COMPARE   TCC1->CC[0].bit.CC
 
#define FUEL6_COMPARE   TCC1->CC[1].bit.CC
 
#define FUEL7_COMPARE   TCC1->CC[2].bit.CC
 
#define FUEL8_COMPARE   TCC1->CC[3].bit.CC
 
#define IGN1_COMPARE   TCC1->CC[0].bit.CC
 
#define IGN2_COMPARE   TCC1->CC[1].bit.CC
 
#define IGN3_COMPARE   TCC2->CC[0].bit.CC
 
#define IGN4_COMPARE   TCC2->CC[1].bit.CC
 
#define IGN5_COMPARE   TCC1->CC[0].bit.CC
 
#define IGN6_COMPARE   TCC1->CC[1].bit.CC
 
#define IGN7_COMPARE   TCC2->CC[0].bit.CC
 
#define IGN8_COMPARE   TCC2->CC[1].bit.CC
 
#define MAX_TIMER_PERIOD   139808
 
#define MAX_TIMER_PERIOD_SLOW   139808
 
#define uS_TO_TIMER_COMPARE(uS)   (((uS) * 15) >> 5)
 
#define uS_TO_TIMER_COMPARE_SLOW(uS)   (((uS) * 15) >> 5)
 
#define ENABLE_BOOST_TIMER()   TC4->COUNT16.INTENSET.bit.MC0 = 0x1
 
#define DISABLE_BOOST_TIMER()   TC4->COUNT16.INTENSET.bit.MC0 = 0x0
 
#define ENABLE_VVT_TIMER()   TC4->COUNT16.INTENSET.bit.MC1 = 0x1
 
#define DISABLE_VVT_TIMER()   TC4->COUNT16.INTENSET.bit.MC1 = 0x0
 
#define BOOST_TIMER_COMPARE   TC4->COUNT16.CC[0].reg
 
#define BOOST_TIMER_COUNTER   TC4->COUNT16.COUNT.bit.COUNT
 
#define VVT_TIMER_COMPARE   TC4->COUNT16.CC[1].reg
 
#define VVT_TIMER_COUNTER   TC4->COUNT16.COUNT.bit.COUNT
 
#define IDLE_COUNTER   TC5->COUNT16.COUNT.bit.COUNT
 
#define IDLE_COMPARE   TC5->COUNT16.CC[0].reg
 
#define IDLE_TIMER_ENABLE()   TC5->COUNT16.INTENSET.bit.MC0 = 0x1
 
#define IDLE_TIMER_DISABLE()   TC5->COUNT16.INTENSET.bit.MC0 = 0x0
 

Typedefs

typedef uint16_t eeprom_address_t
 

Functions

static void FUEL1_TIMER_ENABLE (void)
 
static void FUEL2_TIMER_ENABLE (void)
 
static void FUEL3_TIMER_ENABLE (void)
 
static void FUEL4_TIMER_ENABLE (void)
 
static void FUEL5_TIMER_ENABLE (void)
 
static void FUEL6_TIMER_ENABLE (void)
 
static void FUEL7_TIMER_ENABLE (void)
 
static void FUEL8_TIMER_ENABLE (void)
 
static void FUEL1_TIMER_DISABLE (void)
 
static void FUEL2_TIMER_DISABLE (void)
 
static void FUEL3_TIMER_DISABLE (void)
 
static void FUEL4_TIMER_DISABLE (void)
 
static void FUEL5_TIMER_DISABLE (void)
 
static void FUEL6_TIMER_DISABLE (void)
 
static void FUEL7_TIMER_DISABLE (void)
 
static void FUEL9_TIMER_DISABLE (void)
 
static void IGN1_TIMER_ENABLE (void)
 
static void IGN2_TIMER_ENABLE (void)
 
static void IGN3_TIMER_ENABLE (void)
 
static void IGN4_TIMER_ENABLE (void)
 
static void IGN5_TIMER_ENABLE (void)
 
static void IGN6_TIMER_ENABLE (void)
 
static void IGN7_TIMER_ENABLE (void)
 
static void IGN8_TIMER_ENABLE (void)
 
static void IGN1_TIMER_DISABLE (void)
 
static void IGN2_TIMER_DISABLE (void)
 
static void IGN3_TIMER_DISABLE (void)
 
static void IGN4_TIMER_DISABLE (void)
 
static void IGN5_TIMER_DISABLE (void)
 
static void IGN6_TIMER_DISABLE (void)
 
static void IGN7_TIMER_DISABLE (void)
 
static void IGN8_TIMER_DISABLE (void)
 

Variables

static const uint8_t A7 = PIN_A7
 
static const uint8_t A8 = PIN_A8
 
static const uint8_t A9 = PIN_A9
 
static const uint8_t A13 = PIN_A13
 
static const uint8_t A14 = PIN_A14
 
static const uint8_t A15 = PIN_A15
 
Uart secondarySerialsercom3
 

Macro Definition Documentation

◆ BOARD_MAX_DIGITAL_PINS

#define BOARD_MAX_DIGITAL_PINS   54

◆ BOARD_MAX_IO_PINS

#define BOARD_MAX_IO_PINS   58

◆ BOOST_TIMER_COMPARE

#define BOOST_TIMER_COMPARE   TC4->COUNT16.CC[0].reg

◆ BOOST_TIMER_COUNTER

#define BOOST_TIMER_COUNTER   TC4->COUNT16.COUNT.bit.COUNT

◆ COMPARE_TYPE

#define COMPARE_TYPE   uint16_t

◆ CORE_SAM

#define CORE_SAM

◆ CORE_SAME51

#define CORE_SAME51

DO NOT INCLUDE DIRECTLY - should be included via board_definition.h

◆ DISABLE_BOOST_TIMER

#define DISABLE_BOOST_TIMER ( )    TC4->COUNT16.INTENSET.bit.MC0 = 0x0

◆ DISABLE_VVT_TIMER

#define DISABLE_VVT_TIMER ( )    TC4->COUNT16.INTENSET.bit.MC1 = 0x0

◆ EEPROM_LIB_H

#define EEPROM_LIB_H   "src/FlashStorage/FlashAsEEPROM.h"

◆ ENABLE_BOOST_TIMER

#define ENABLE_BOOST_TIMER ( )    TC4->COUNT16.INTENSET.bit.MC0 = 0x1

◆ ENABLE_VVT_TIMER

#define ENABLE_VVT_TIMER ( )    TC4->COUNT16.INTENSET.bit.MC1 = 0x1

◆ FPU_MAX_SIZE

#define FPU_MAX_SIZE   32

◆ FUEL1_COMPARE

#define FUEL1_COMPARE   TCC0->CC[0].bit.CC

◆ FUEL1_COUNTER

#define FUEL1_COUNTER   TCC0->COUNT.reg

◆ FUEL2_COMPARE

#define FUEL2_COMPARE   TCC0->CC[1].bit.CC

◆ FUEL2_COUNTER

#define FUEL2_COUNTER   TCC0->COUNT.reg

◆ FUEL3_COMPARE

#define FUEL3_COMPARE   TCC0->CC[2].bit.CC

◆ FUEL3_COUNTER

#define FUEL3_COUNTER   TCC0->COUNT.reg

◆ FUEL4_COMPARE

#define FUEL4_COMPARE   TCC0->CC[3].bit.CC

◆ FUEL4_COUNTER

#define FUEL4_COUNTER   TCC0->COUNT.reg

◆ FUEL5_COMPARE

#define FUEL5_COMPARE   TCC1->CC[0].bit.CC

◆ FUEL5_COUNTER

#define FUEL5_COUNTER   TCC1->COUNT.reg

◆ FUEL6_COMPARE

#define FUEL6_COMPARE   TCC1->CC[1].bit.CC

◆ FUEL6_COUNTER

#define FUEL6_COUNTER   TCC1->COUNT.reg

◆ FUEL7_COMPARE

#define FUEL7_COMPARE   TCC1->CC[2].bit.CC

◆ FUEL7_COUNTER

#define FUEL7_COUNTER   TCC1->COUNT.reg

◆ FUEL8_COMPARE

#define FUEL8_COMPARE   TCC1->CC[3].bit.CC

◆ FUEL8_COUNTER

#define FUEL8_COUNTER   TCC1->COUNT.reg

◆ IDLE_COMPARE

#define IDLE_COMPARE   TC5->COUNT16.CC[0].reg

◆ IDLE_COUNTER

#define IDLE_COUNTER   TC5->COUNT16.COUNT.bit.COUNT

◆ IDLE_TIMER_DISABLE

#define IDLE_TIMER_DISABLE ( )    TC5->COUNT16.INTENSET.bit.MC0 = 0x0

◆ IDLE_TIMER_ENABLE

#define IDLE_TIMER_ENABLE ( )    TC5->COUNT16.INTENSET.bit.MC0 = 0x1

◆ IGN1_COMPARE

#define IGN1_COMPARE   TCC1->CC[0].bit.CC

◆ IGN1_COUNTER

#define IGN1_COUNTER   TCC1->COUNT.reg

◆ IGN2_COMPARE

#define IGN2_COMPARE   TCC1->CC[1].bit.CC

◆ IGN2_COUNTER

#define IGN2_COUNTER   TCC1->COUNT.reg

◆ IGN3_COMPARE

#define IGN3_COMPARE   TCC2->CC[0].bit.CC

◆ IGN3_COUNTER

#define IGN3_COUNTER   TCC2->COUNT.reg

◆ IGN4_COMPARE

#define IGN4_COMPARE   TCC2->CC[1].bit.CC

◆ IGN4_COUNTER

#define IGN4_COUNTER   TCC2->COUNT.reg

◆ IGN5_COMPARE

#define IGN5_COMPARE   TCC1->CC[0].bit.CC

◆ IGN5_COUNTER

#define IGN5_COUNTER   TCC1->COUNT.reg

◆ IGN6_COMPARE

#define IGN6_COMPARE   TCC1->CC[1].bit.CC

◆ IGN6_COUNTER

#define IGN6_COUNTER   TCC1->COUNT.reg

◆ IGN7_COMPARE

#define IGN7_COMPARE   TCC2->CC[0].bit.CC

◆ IGN7_COUNTER

#define IGN7_COUNTER   TCC2->COUNT.reg

◆ IGN8_COMPARE

#define IGN8_COMPARE   TCC2->CC[1].bit.CC

◆ IGN8_COUNTER

#define IGN8_COUNTER   TCC2->COUNT.reg

◆ IGN_CHANNELS

#define IGN_CHANNELS   8

◆ INJ_CHANNELS

#define INJ_CHANNELS   8

◆ MAX_TIMER_PERIOD

#define MAX_TIMER_PERIOD   139808

◆ MAX_TIMER_PERIOD_SLOW

#define MAX_TIMER_PERIOD_SLOW   139808

◆ PIN_A13

#define PIN_A13   (9ul)

◆ PIN_A14

#define PIN_A14   (9ul)

◆ PIN_A15

#define PIN_A15   (9ul)

◆ PIN_A6

#define PIN_A6   (8ul)

◆ PIN_A7

#define PIN_A7   (9ul)

◆ PIN_A8

#define PIN_A8   (10ul)

◆ PIN_A9

#define PIN_A9   (11ul)

◆ pinIsReserved

#define pinIsReserved (   pin)    ( ((pin) == 0) )

◆ RTC_LIB_H

#define RTC_LIB_H   "TimeLib.h"

◆ SERIAL_BUFFER_SIZE

#define SERIAL_BUFFER_SIZE   257

◆ uS_TO_TIMER_COMPARE

#define uS_TO_TIMER_COMPARE (   uS)    (((uS) * 15) >> 5)

◆ uS_TO_TIMER_COMPARE_SLOW

#define uS_TO_TIMER_COMPARE_SLOW (   uS)    (((uS) * 15) >> 5)

◆ VVT_TIMER_COMPARE

#define VVT_TIMER_COMPARE   TC4->COUNT16.CC[1].reg

◆ VVT_TIMER_COUNTER

#define VVT_TIMER_COUNTER   TC4->COUNT16.COUNT.bit.COUNT

Typedef Documentation

◆ eeprom_address_t

Function Documentation

◆ FUEL1_TIMER_DISABLE()

static void FUEL1_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL1_TIMER_ENABLE()

static void FUEL1_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL2_TIMER_DISABLE()

static void FUEL2_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL2_TIMER_ENABLE()

static void FUEL2_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL3_TIMER_DISABLE()

static void FUEL3_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL3_TIMER_ENABLE()

static void FUEL3_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL4_TIMER_DISABLE()

static void FUEL4_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL4_TIMER_ENABLE()

static void FUEL4_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL5_TIMER_DISABLE()

static void FUEL5_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL5_TIMER_ENABLE()

static void FUEL5_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL6_TIMER_DISABLE()

static void FUEL6_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL6_TIMER_ENABLE()

static void FUEL6_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL7_TIMER_DISABLE()

static void FUEL7_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL7_TIMER_ENABLE()

static void FUEL7_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL8_TIMER_ENABLE()

static void FUEL8_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ FUEL9_TIMER_DISABLE()

static void FUEL9_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN1_TIMER_DISABLE()

static void IGN1_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN1_TIMER_ENABLE()

static void IGN1_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN2_TIMER_DISABLE()

static void IGN2_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN2_TIMER_ENABLE()

static void IGN2_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN3_TIMER_DISABLE()

static void IGN3_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN3_TIMER_ENABLE()

static void IGN3_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN4_TIMER_DISABLE()

static void IGN4_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN4_TIMER_ENABLE()

static void IGN4_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN5_TIMER_DISABLE()

static void IGN5_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN5_TIMER_ENABLE()

static void IGN5_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN6_TIMER_DISABLE()

static void IGN6_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN6_TIMER_ENABLE()

static void IGN6_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN7_TIMER_DISABLE()

static void IGN7_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN7_TIMER_ENABLE()

static void IGN7_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN8_TIMER_DISABLE()

static void IGN8_TIMER_DISABLE ( void  )
inlinestatic
Here is the call graph for this function:

◆ IGN8_TIMER_ENABLE()

static void IGN8_TIMER_ENABLE ( void  )
inlinestatic
Here is the call graph for this function:

Variable Documentation

◆ A13

const uint8_t A13 = PIN_A13
static

◆ A14

const uint8_t A14 = PIN_A14
static

◆ A15

const uint8_t A15 = PIN_A15
static

◆ A7

const uint8_t A7 = PIN_A7
static

◆ A8

const uint8_t A8 = PIN_A8
static

◆ A9

const uint8_t A9 = PIN_A9
static

◆ sercom3