Loading...
Searching...
No Matches
Interface

TIM interface for. More...

Data Structures

struct  TIM_CCMR_Output
 
struct  TIM_Config
 TIM configuration struct. More...
 
struct  TIM_t
 Struct definition for TIM interface. Provides the interface for API consumers to interact with the TIM peripheral. More...
 

Functions

TIM_t TIM_init (TIM_TypeDef *interface, TIM_Config *config)
 Initialiser for an SPI device interface.
 
void TIM_startCounter (TIM_t *tim)
 
void TIM_updateConfig (TIM_t *tim, TIM_Config *config)
 Update TIM peripheral configuration.
 
bool TIM_setTimingPWM (TIM_t *tim, TIM_Channel channel, float duty)
 
bool TIM_pollCompare (TIM_t *tim, TIM_Channel channel)
 
bool TIM_setTimingPeriod (TIM_t *tim, float period)
 
bool TIM_pollUpdate (TIM_t *tim)
 

Detailed Description

TIM interface for.


Data Structure Documentation

◆ TIM_CCMR_Output

struct TIM_CCMR_Output

Definition at line 140 of file tim.h.

◆ TIM_Config

struct TIM_Config

TIM configuration struct.

Describes the configuration of .

Definition at line 152 of file tim.h.

◆ TIM_t

struct TIM_t

Struct definition for TIM interface. Provides the interface for API consumers to interact with the TIM peripheral.

Definition at line 170 of file tim.h.

Data Fields
TIM_TypeDef * interface Pointer to TIM interface struct.
TIM_Config config Configuration parameters for the TIM peripheral.
void(*)(struct TIM *tim) startCounter TIM configuration update method.
See also
TIM_updateConfig
bool(*)(struct TIM *tim) pollUpdate
bool(*)(struct TIM *tim, float period) setTimingPeriod
bool(*)(struct TIM *tim, TIM_Channel channel) pollCompare
bool(*)(struct TIM *tim, TIM_Channel channel, float duty) setTimingPWM
void(*)(struct TIM *tim, TIM_Config *config) updateConfig TIM configuration update method.
See also
TIM_updateConfig

Function Documentation

◆ TIM_init()

TIM_t TIM_init ( TIM_TypeDef * interface,
TIM_Config * config )

Initialiser for an SPI device interface.

Parameters
interfacePointer to the SPI_TypeDef struct representing the SPI interface.
configPointer to SPI_Config struct for initial configuration. This may be passed as NULL to initialise a default configuration.
Returns
spi Initialised SPI_t struct.

Definition at line 30 of file tim.c.

◆ TIM_startCounter()

void TIM_startCounter ( TIM_t * tim)
Parameters

return .


Definition at line 160 of file tim.c.

◆ TIM_updateConfig()

void TIM_updateConfig ( TIM_t * tim,
TIM_Config * config )

Update TIM peripheral configuration.

Uses the provided configuration to update the TIM registers and resets the associated peripheral. As with initialisation, passing NULL will set the default config.

Parameters
spiPointer to TIM_t struct.
Returns
NULL.

Definition at line 282 of file tim.c.

◆ TIM_setTimingPWM()

bool TIM_setTimingPWM ( TIM_t * tim,
TIM_Channel channel,
float duty )
Parameters
time
micros
Returns
.

Definition at line 259 of file tim.c.

◆ TIM_pollCompare()

bool TIM_pollCompare ( TIM_t * tim,
TIM_Channel channel )
Parameters

return .


Definition at line 241 of file tim.c.

◆ TIM_setTimingPeriod()

bool TIM_setTimingPeriod ( TIM_t * tim,
float period )
Parameters
time
micros
Returns
.

Definition at line 193 of file tim.c.

◆ TIM_pollUpdate()

bool TIM_pollUpdate ( TIM_t * tim)
Parameters

return .


Definition at line 175 of file tim.c.