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
14typedef 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
21void _setHighFrequency(const long freq, const int pin);
22
23void* _configureCenterAligned3PMW(long pwm_frequency, const int pinA, const int pinB, const int pinC);
24void _writeCenterAligned3PMW(float dc_a, float dc_b, float dc_c, void* params);
25
26#endif
27#endif
const int const int const int pinC
GenericCurrentSenseParams * params
#define NOT_SET
Definition foc_utils.h:34