#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "stm32f10x_conf.h"
#include "drv_gpio.h"
#include "drv_timer.h"
#include "drv_pwm.h"
#include "drv_system.h"
Go to the source code of this file.
|
static void | configureSonar (uint8_t port) |
|
static void | ppmCallback (uint8_t port, uint16_t capture) |
|
static void | pwmCallback (uint8_t port, uint16_t capture) |
|
static void | pwmGPIOConfig (GPIO_TypeDef *gpio, uint32_t pin, GPIO_Mode mode) |
|
static void | pwmICConfig (TIM_TypeDef *tim, uint8_t channel, uint16_t polarity) |
|
static pwmPortData_t * | pwmInConfig (uint8_t port, timerCCCallbackPtr callback, uint8_t channel) |
|
void | pwmInit (bool useCPPM, bool usePwmFilter, bool fastPWM, uint32_t motorPwmRate, uint16_t idlePulseUsec) |
|
uint32_t | pwmLastUpdate () |
|
bool | pwmNewData () |
|
static void | pwmOCConfig (TIM_TypeDef *tim, uint8_t channel, uint16_t value) |
|
static pwmPortData_t * | pwmOutConfig (uint8_t port, uint8_t mhz, uint16_t period, uint16_t value) |
|
uint16_t | pwmRead (uint8_t channel) |
|
static void | pwmWriteBrushed (uint8_t index, uint16_t value) |
|
void | pwmWriteMotor (uint8_t index, uint16_t value) |
|
static void | pwmWriteStandard (uint8_t index, uint16_t value) |
|
static void | sonarCallback (uint8_t port, uint16_t capture) |
|
bool | sonarPresent () |
|
float | sonarRead (uint8_t channel) |
|
◆ PWM_TIMER_8_MHZ
#define PWM_TIMER_8_MHZ 8 |
◆ PWM_TIMER_MHZ
◆ pwmWriteFuncPtr
typedef void(* pwmWriteFuncPtr) (uint8_t index, uint16_t value) |
◆ anonymous enum
Enumerator |
---|
TYPE_IP | |
TYPE_IW | |
TYPE_M | |
TYPE_S | |
Definition at line 274 of file drv_pwm.c.
◆ anonymous enum
Enumerator |
---|
TYPE_PWM_IN_OUT | |
TYPE_GPIO_OUTPUT | |
Definition at line 281 of file drv_pwm.c.
◆ configureSonar()
static void configureSonar |
( |
uint8_t |
port | ) |
|
|
static |
◆ ppmCallback()
static void ppmCallback |
( |
uint8_t |
port, |
|
|
uint16_t |
capture |
|
) |
| |
|
static |
◆ pwmCallback()
static void pwmCallback |
( |
uint8_t |
port, |
|
|
uint16_t |
capture |
|
) |
| |
|
static |
◆ pwmGPIOConfig()
◆ pwmICConfig()
static void pwmICConfig |
( |
TIM_TypeDef * |
tim, |
|
|
uint8_t |
channel, |
|
|
uint16_t |
polarity |
|
) |
| |
|
static |
◆ pwmInConfig()
◆ pwmInit()
void pwmInit |
( |
bool |
useCPPM, |
|
|
bool |
usePwmFilter, |
|
|
bool |
fastPWM, |
|
|
uint32_t |
motorPwmRate, |
|
|
uint16_t |
idlePulseUsec |
|
) |
| |
◆ pwmLastUpdate()
uint32_t pwmLastUpdate |
( |
| ) |
|
◆ pwmNewData()
◆ pwmOCConfig()
static void pwmOCConfig |
( |
TIM_TypeDef * |
tim, |
|
|
uint8_t |
channel, |
|
|
uint16_t |
value |
|
) |
| |
|
static |
◆ pwmOutConfig()
static pwmPortData_t* pwmOutConfig |
( |
uint8_t |
port, |
|
|
uint8_t |
mhz, |
|
|
uint16_t |
period, |
|
|
uint16_t |
value |
|
) |
| |
|
static |
◆ pwmRead()
uint16_t pwmRead |
( |
uint8_t |
channel | ) |
|
◆ pwmWriteBrushed()
static void pwmWriteBrushed |
( |
uint8_t |
index, |
|
|
uint16_t |
value |
|
) |
| |
|
static |
◆ pwmWriteMotor()
void pwmWriteMotor |
( |
uint8_t |
index, |
|
|
uint16_t |
value |
|
) |
| |
◆ pwmWriteStandard()
static void pwmWriteStandard |
( |
uint8_t |
index, |
|
|
uint16_t |
value |
|
) |
| |
|
static |
◆ sonarCallback()
static void sonarCallback |
( |
uint8_t |
port, |
|
|
uint16_t |
capture |
|
) |
| |
|
static |
◆ sonarPresent()
◆ sonarRead()
float sonarRead |
( |
uint8_t |
channel | ) |
|
◆ captures
◆ motors
◆ multiPPM
const uint16_t multiPPM[] |
|
static |
◆ multiPPMSONAR
const uint16_t multiPPMSONAR[] |
|
static |
◆ multiPWM
const uint16_t multiPWM[] |
|
static |
◆ new_data
◆ numInputs
◆ numMotors
◆ pwmFilter
◆ pwmLastUpdateTime_ms
uint32_t pwmLastUpdateTime_ms = 0 |
|
static |
◆ pwmPorts
◆ pwmWritePtr
◆ sonar_present
bool sonar_present = false |
|
static |
◆ sonar_reads
◆ sonar_trigger_port
uint8_t sonar_trigger_port |
|
static |