aversive_10-03-12/modules/devices/encoders/encoders_spi/encoders_spi.c File Reference

#include <string.h>
#include <aversive.h>
#include <aversive/parts.h>
#include <spi.h>
#include <encoders_spi.h>
#include <encoders_spi_config.h>

Go to the source code of this file.

Functions

void encoders_spi_init (void)
void encoders_spi_manage (void *dummy)
int32_t encoders_spi_get_value (void *encoder)
void encoders_spi_set_value (void *encoder, int32_t val)


Function Documentation

int32_t encoders_spi_get_value ( void *  encoder  ) 

Extract encoder value.

Definition at line 82 of file encoders_spi.c.

References IRQ_LOCK, and IRQ_UNLOCK.

void encoders_spi_init ( void   ) 

Initialisation of encoders, variables

Definition at line 42 of file encoders_spi.c.

References spi_init(), SPI_MODE_MASTER, spi_register_ss_line(), and spi_set_data_order().

void encoders_spi_manage ( void *  dummy  ) 

Update encoders values, need to be done quite often

Definition at line 53 of file encoders_spi.c.

References i, IRQ_LOCK, IRQ_UNLOCK, s, spi_receive_byte(), spi_slave_deselect(), and spi_slave_select().

void encoders_spi_set_value ( void *  encoder,
int32_t  val 
)

Set an encoder value

Definition at line 95 of file encoders_spi.c.

References IRQ_LOCK, and IRQ_UNLOCK.


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6