Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
amt22.c File Reference
#include "amt22.h"
+ Include dependency graph for amt22.c:

Go to the source code of this file.

Macros

#define AMT22_SPI_CDIV   SPIDiv256
 

Functions

static bool amt22_checkbit (uint8_t p0, uint8_t p1)
 
static void amt22_thd (void *arg)
 
void amt22_init (amt22_t *amt, amt22_config_t *conf)
 
void amt22_periodic (amt22_t *amt)
 
bool amt22_read (amt22_t *amt)
 
uint16_t amt22_get_position (amt22_t *amt)
 
int16_t amt22_get_turns (amt22_t *amt)
 

Macro Definition Documentation

◆ AMT22_SPI_CDIV

#define AMT22_SPI_CDIV   SPIDiv256

Definition at line 5 of file amt22.c.

Function Documentation

◆ amt22_checkbit()

static bool amt22_checkbit ( uint8_t  p0,
uint8_t  p1 
)
static

Definition at line 91 of file amt22.c.

References foo.

Referenced by amt22_read().

+ Here is the caller graph for this function:

◆ amt22_get_position()

uint16_t amt22_get_position ( amt22_t amt)

Definition at line 111 of file amt22.c.

References amt, pprz_mtx_lock(), and pprz_mtx_unlock().

Referenced by encoder_amt22_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ amt22_get_turns()

int16_t amt22_get_turns ( amt22_t amt)

Definition at line 118 of file amt22.c.

References amt, pprz_mtx_lock(), and pprz_mtx_unlock().

Referenced by encoder_amt22_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ amt22_init()

void amt22_init ( amt22_t amt,
amt22_config_t conf 
)

Definition at line 12 of file amt22.c.

References amt, AMT22_12_SINGLE, AMT22_14_SINGLE, AMT22_SPI_CDIV, amt22_thd(), foo, pprz_bsem_init(), pprz_mtx_init(), PPRZ_NORMAL_PRIO, pprz_thread_create(), SPICphaEdge1, SPICpolIdleLow, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, and SPITransDone.

Referenced by encoder_amt22_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ amt22_periodic()

void amt22_periodic ( amt22_t amt)

Definition at line 52 of file amt22.c.

References amt, and pprz_bsem_signal().

Referenced by encoder_amt22_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ amt22_read()

bool amt22_read ( amt22_t amt)

Definition at line 58 of file amt22.c.

References amt, AMT22_12_MULTI, AMT22_12_SINGLE, AMT22_14_MULTI, amt22_checkbit(), pprz_mtx_lock(), pprz_mtx_unlock(), spi_blocking_transceive(), SPITransSuccess, t0, and t1.

Referenced by amt22_thd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ amt22_thd()

static void amt22_thd ( void arg)
static

Definition at line 126 of file amt22.c.

References amt, amt22_read(), and pprz_bsem_wait().

Referenced by amt22_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: