BeRTOS
Data Structures | Typedefs | Enumerations | Functions
stepper_at91.h File Reference

Stepper hardware-specific definitions. More...

#include <cfg/compiler.h>
#include <cfg/macros.h>
#include <drv/stepper.h>
#include <io/arm.h>

Go to the source code of this file.

Data Structures

struct  TimerCounter
 Timer contex structure. More...

Typedefs

typedef void(* irq_t )(void)
 IRQ callback function type definition.

Enumerations

enum  
 Setting master clock prescaler for all timer couter. More...

Functions

void stepper_tc_irq_enable (struct TimerCounter *timer)
 Enable interrupt for timer counter compare event.
void stepper_tc_irq_disable (struct TimerCounter *timer)
 Disable interrupt for timer counter compare event.
void stepper_tc_setDelay (struct TimerCounter *timer, stepper_time_t delay)
 Set delay for next interrupt compare event.
void stepper_tc_resetTimer (struct TimerCounter *timer)
 Set delay for next interrupt compare event.
void FAST_FUNC stepper_tc_doPulse (struct TimerCounter *timer)
 Programm timer counter to generate a pulse on select TIO output.
void FAST_FUNC stepper_tc_skipPulse (struct TimerCounter *timer)
 Programm timer counter to not generate a pulse on select TIO output.
void stepper_tc_setup (int index, stepper_isr_t callback, struct Stepper *motor)
 Timer couter setup.
void stepper_tc_init (void)
 Timer counter init.

Detailed Description

Stepper hardware-specific definitions.

Author:
Daniele Basile <asterix@develer.com>

Definition in file stepper_at91.h.


Enumeration Type Documentation

anonymous enum

Setting master clock prescaler for all timer couter.

You could choise one of these:

  • TC_CLKS_MCK2: Selects MCK / 2
  • TC_CLKS_MCK8: Selects MCK / 8
  • TC_CLKS_MCK32: Selects MCK / 32
  • TC_CLKS_MCK128: Selects MCK / 128
  • TC_CLKS_MCK1024: Selects MCK / 1024 Timer counter hw enumeration.

Definition at line 72 of file stepper_at91.h.


Function Documentation

void stepper_tc_setup ( int  index,
stepper_isr_t  callback,
struct Stepper motor 
)

Timer couter setup.

This function apply to select timer couter all needed settings. Every settings are stored in stepper_timers[].

Timer couter setup.

Timer couter setup.

This function apply to select timer couter all needed settings. Every settings are stored in stepper_timers[].

Definition at line 332 of file stepper_at91.c.