SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
generic_mcu.cpp File Reference
#include "../hardware_api.h"
Include dependency graph for drivers/hardware_specific/generic_mcu.cpp:

Go to the source code of this file.

Functions

 __attribute__ ((weak)) void *_configure1PWM(long pwm_frequency
 
 _UNUSED (dead_zone)
 
 _UNUSED (pinA_h)
 
 _UNUSED (pinA_l)
 
 _UNUSED (pinB_h)
 
 _UNUSED (pinB_l)
 
 _UNUSED (pinC_h)
 
 _UNUSED (pinC_l)
 
 analogWrite (((GenericDriverParams *) params) ->pins[1], 255.0f *dc_b)
 
 analogWrite (((GenericDriverParams *) params) ->pins[2], 255.0f *dc_c)
 
 analogWrite (((GenericDriverParams *) params) ->pins[3], 255.0f *dc_2b)
 
 _UNUSED (dc_b)
 
 _UNUSED (dc_c)
 
 _UNUSED (phase_state)
 
 _UNUSED (params)
 

Variables

const int pinA
 
return params
 
const int const int pinB
 
const int const int const int pinC
 
const int pin1A
 
const int const int pin1B
 
const int const int const int pin2A
 
const int const int const int const int pin2B
 
float dead_zone
 
float const int pinA_h
 
float const int const int pinA_l
 
float const int const int const int pinB_h
 
float const int const int const int const int pinB_l
 
float const int const int const int const int const int pinC_h
 
float const int const int const int const int const int const int pinC_l
 
return SIMPLEFOC_DRIVER_INIT_FAILED
 
float dc_b
 
float float dc_c
 
float dc_1b
 
float float dc_2a
 
float float float dc_2b
 
float float PhaseStatephase_state
 

Function Documentation

◆ __attribute__()

__attribute__ ( (weak)  )

◆ _UNUSED() [1/11]

_UNUSED ( dc_b  )

◆ _UNUSED() [2/11]

_UNUSED ( dc_c  )

◆ _UNUSED() [3/11]

_UNUSED ( dead_zone  )

◆ _UNUSED() [4/11]

_UNUSED ( params  )

◆ _UNUSED() [5/11]

_UNUSED ( phase_state  )

◆ _UNUSED() [6/11]

_UNUSED ( pinA_h  )

◆ _UNUSED() [7/11]

_UNUSED ( pinA_l  )

◆ _UNUSED() [8/11]

_UNUSED ( pinB_h  )

◆ _UNUSED() [9/11]

_UNUSED ( pinB_l  )

◆ _UNUSED() [10/11]

_UNUSED ( pinC_h  )

◆ _UNUSED() [11/11]

_UNUSED ( pinC_l  )

◆ analogWrite() [1/3]

analogWrite ( ((GenericDriverParams *) params) ->  pins[1],
255.0f *  dc_b 
)

◆ analogWrite() [2/3]

analogWrite ( ((GenericDriverParams *) params) ->  pins[2],
255.0f *  dc_c 
)

◆ analogWrite() [3/3]

analogWrite ( ((GenericDriverParams *) params) ->  pins[3],
255.0f *  dc_2b 
)

Variable Documentation

◆ dc_1b

float dc_1b

Definition at line 106 of file drivers/hardware_specific/generic_mcu.cpp.

◆ dc_2a

float float dc_2a

Definition at line 106 of file drivers/hardware_specific/generic_mcu.cpp.

◆ dc_2b

float float float dc_2b

Definition at line 106 of file drivers/hardware_specific/generic_mcu.cpp.

◆ dc_b

float dc_b

Definition at line 87 of file drivers/hardware_specific/generic_mcu.cpp.

◆ dc_c

float float dc_c

Definition at line 96 of file drivers/hardware_specific/generic_mcu.cpp.

◆ dead_zone

float dead_zone

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ params

float float PhaseState void* params
Initial value:
{
analogWrite(((GenericDriverParams*)params)->pins[0], 255.0f*dc_a)
analogWrite(((GenericDriverParams *) params) ->pins[1], 255.0f *dc_b)

Definition at line 18 of file drivers/hardware_specific/generic_mcu.cpp.

◆ phase_state

float float PhaseState* phase_state

Definition at line 119 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pin1A

const int pin1A

Definition at line 50 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pin1B

const int const int pin1B

Definition at line 50 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pin2A

const int const int const int pin2A

Definition at line 50 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pin2B

const int const int const int const int pin2B
Initial value:
{
.pins = { pin1A, pin1B, pin2A, pin2B },
.pwm_frequency = pwm_frequency
}
const int const int pin1B
const int const int const int pin2A
const int const int const int const int pin2B

Definition at line 50 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinA

const int pinA
Initial value:
{
.pins = { pinA },
.pwm_frequency = pwm_frequency
}

Definition at line 13 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinA_h

float const int pinA_h

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinA_l

float const int const int pinA_l

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinB

const int const int pinB
Initial value:
{
.pins = { pinA, pinB },
.pwm_frequency = pwm_frequency
}
const int const int pinB

Definition at line 25 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinB_h

float const int const int const int pinB_h

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinB_l

float const int const int const int const int pinB_l

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinC

const int const int const int pinC
Initial value:
{
.pins = { pinA, pinB, pinC },
.pwm_frequency = pwm_frequency
}
const int const int const int pinC

Definition at line 37 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinC_h

float const int const int const int const int const int pinC_h

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ pinC_l

float const int const int const int const int const int const int pinC_l
Initial value:
{
_UNUSED(pwm_frequency)
#define _UNUSED(v)
Definition foc_utils.h:14

Definition at line 61 of file drivers/hardware_specific/generic_mcu.cpp.

◆ SIMPLEFOC_DRIVER_INIT_FAILED

return SIMPLEFOC_DRIVER_INIT_FAILED

Definition at line 71 of file drivers/hardware_specific/generic_mcu.cpp.