Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
max1168.h File Reference
#include "std.h"
#include "peripherals/max1168_arch.h"
+ Include dependency graph for max1168.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX1168_NB_CHAN   8
 
#define MAX1168_SLAVE_IDX   SPI_SLAVE0
 
#define MAX1168_SPI_DEV   spi1
 
#define MAX1168_CONF_CHANNEL   0x7
 Configure control register. More...
 
#define MAX1168_CONF_SCAN   0x1
 
#define MAX1168_CONF_REF   0x0
 
#define MAX1168_CONF_CLOCK   0x1
 
#define MAX1168_CONF_CR   ((MAX1168_CONF_CHANNEL<<5)|(MAX1168_CONF_SCAN<<3)|(MAX1168_CONF_REF<<1)|(MAX1168_CONF_CLOCK))
 
#define MAX1168_IDLE   0
 
#define MAX1168_SENDING_REQ   1
 
#define MAX1168_GOT_EOC   2
 
#define MAX1168_READING_RES   3
 
#define MAX1168_DATA_AVAILABLE   4
 
#define Max1168Periodic()
 

Functions

void max1168_init (void)
 
void max1168_read (void)
 
void max1168_event (void)
 
void max1168_arch_init (void)
 

Variables

volatile uint8_t max1168_status
 
uint16_t max1168_values [MAX1168_NB_CHAN]
 

Macro Definition Documentation

◆ MAX1168_CONF_CHANNEL

#define MAX1168_CONF_CHANNEL   0x7

Configure control register.

Definition at line 41 of file max1168.h.

◆ MAX1168_CONF_CLOCK

#define MAX1168_CONF_CLOCK   0x1

Definition at line 50 of file max1168.h.

◆ MAX1168_CONF_CR

#define MAX1168_CONF_CR   ((MAX1168_CONF_CHANNEL<<5)|(MAX1168_CONF_SCAN<<3)|(MAX1168_CONF_REF<<1)|(MAX1168_CONF_CLOCK))

Definition at line 53 of file max1168.h.

◆ MAX1168_CONF_REF

#define MAX1168_CONF_REF   0x0

Definition at line 47 of file max1168.h.

◆ MAX1168_CONF_SCAN

#define MAX1168_CONF_SCAN   0x1

Definition at line 44 of file max1168.h.

◆ MAX1168_DATA_AVAILABLE

#define MAX1168_DATA_AVAILABLE   4

Definition at line 63 of file max1168.h.

◆ MAX1168_GOT_EOC

#define MAX1168_GOT_EOC   2

Definition at line 61 of file max1168.h.

◆ MAX1168_IDLE

#define MAX1168_IDLE   0

Definition at line 59 of file max1168.h.

◆ MAX1168_NB_CHAN

#define MAX1168_NB_CHAN   8

Definition at line 28 of file max1168.h.

◆ MAX1168_READING_RES

#define MAX1168_READING_RES   3

Definition at line 62 of file max1168.h.

◆ MAX1168_SENDING_REQ

#define MAX1168_SENDING_REQ   1

Definition at line 60 of file max1168.h.

◆ MAX1168_SLAVE_IDX

#define MAX1168_SLAVE_IDX   SPI_SLAVE0

Definition at line 31 of file max1168.h.

◆ MAX1168_SPI_DEV

#define MAX1168_SPI_DEV   spi1

Definition at line 35 of file max1168.h.

◆ Max1168Periodic

#define Max1168Periodic ( )
Value:
{ \
max1168_read(); \
} \
}
volatile uint8_t max1168_status
Definition: max1168.c:27
#define MAX1168_IDLE
Definition: max1168.h:59

Definition at line 68 of file max1168.h.

Function Documentation

◆ max1168_arch_init()

void max1168_arch_init ( void  )

Definition at line 24 of file max1168_arch.c.

References GPIO2, and GPIOB.

Referenced by max1168_init().

+ Here is the caller graph for this function:

◆ max1168_event()

◆ max1168_init()

◆ max1168_read()

void max1168_read ( void  )

Definition at line 26 of file max1168_arch.c.

References max1168_read_trans, max1168_req_trans, MAX1168_SENDING_REQ, MAX1168_SPI_DEV, max1168_status, and spi_submit().

+ Here is the call graph for this function:

Variable Documentation

◆ max1168_status

volatile uint8_t max1168_status
extern

Definition at line 27 of file max1168.c.

Referenced by exti2_isr(), max1168_event(), max1168_init(), and max1168_read().

◆ max1168_values

uint16_t max1168_values[MAX1168_NB_CHAN]
extern

Definition at line 28 of file max1168.c.

Referenced by max1168_init().