/* * riscv-bldc.h * * Created on: 28.07.2018 * Author: eyck */ #ifndef RISCV_BLDC_H_ #define RISCV_BLDC_H_ #include extern uint32_t pwm; extern uint32_t DRIVE_PORT; enum { UL=1, //! Port pin connected to phase U, low side enable switch. UH=0, //! Port pin connected to phase U, high side enable switch. VL=11, //! Port pin connected to phase V, low side enable switch. VH=10, //! Port pin connected to phase V, high side enable switch. WL=19, //! Port pin connected to phase W, low side enable switch. WH=20, //! Port pin connected to phase W, high side enable switch. SENSU_P=0, //! Phase U voltage to sense positive zero cross SENSV_P=1, //! Phase V voltage to sense positive zero cross SENSW_P=2, //! Phase W voltage to sense positive zero cross SENSU_N=4, //! Phase U voltage to sense negative zero cross SENSV_N=5, //! Phase V voltage to sense negative zero cross SENSW_N=6, //! Phase W voltage to sense negative zero cross DRIVE_MASK=(1<