SimpleFOClibrary
2.4.0
Loading...
Searching...
No Matches
teensy_mcu.h
Go to the documentation of this file.
1
#ifndef TEENSY_MCU_DRIVER_H
2
#define TEENSY_MCU_DRIVER_H
3
4
#include "../../hardware_api.h"
5
6
#if defined(__arm__) && defined(CORE_TEENSY)
7
8
#define _PWM_FREQUENCY 25000
// 25khz
9
#define _PWM_FREQUENCY_MAX 50000
// 50khz
10
11
// debugging output
12
#define SIMPLEFOC_TEENSY_DEBUG
13
14
typedef
struct
TeensyDriverParams {
15
int
pins[6] = {(int)
NOT_SET
};
16
long
pwm_frequency;
17
void
* additional_params;
18
} TeensyDriverParams;
19
20
// configure High PWM frequency
21
void
_setHighFrequency(
const
long
freq,
const
int
pin);
22
23
void
* _configureCenterAligned3PMW(
long
pwm_frequency,
const
int
pinA
,
const
int
pinB
,
const
int
pinC
);
24
void
_writeCenterAligned3PMW(
float
dc_a,
float
dc_b
,
float
dc_c
,
void
*
params
);
25
26
#endif
27
#endif
pinB
const int const int pinB
Definition
current_sense/hardware_specific/generic_mcu.cpp:11
pinC
const int const int const int pinC
Definition
current_sense/hardware_specific/generic_mcu.cpp:11
params
GenericCurrentSenseParams * params
Definition
current_sense/hardware_specific/generic_mcu.cpp:18
pinA
const int pinA
Definition
current_sense/hardware_specific/generic_mcu.cpp:11
dc_b
float dc_b
Definition
drivers/hardware_specific/generic_mcu.cpp:87
dc_c
float float dc_c
Definition
drivers/hardware_specific/generic_mcu.cpp:96
NOT_SET
#define NOT_SET
Definition
foc_utils.h:34
src
drivers
hardware_specific
teensy
teensy_mcu.h
Generated by
1.9.8