Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "ADS8344.h"
#include "LPC21xx.h"
#include "armVIC.h"
#include <BOARD_CONFIG>
#include "led.h"
#include "mcu_periph/spi.h"
Go to the source code of this file.
Macros | |
#define | ADS8344_SS_IODIR IO0DIR |
#define | ADS8344_SS_IOSET IO0SET |
#define | ADS8344_SS_IOCLR IO0CLR |
#define | ADS8344_SS_PIN 20 |
#define | ADS8344Select() SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN) |
#define | ADS8344Unselect() SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN) |
#define | POWER_MODE (1 << 1 | 1) |
#define | SGL_DIF 1 |
#define | SSP_DSS 0x07 << 0 /* data size : 8 bits */ |
#define | SSP_FRF 0x00 << 4 /* frame format : SPI */ |
#define | SSP_CPOL 0x00 << 6 /* clock polarity : idle low */ |
#define | SSP_CPHA 0x00 << 7 /* clock phase : 1 */ |
#define | SSP_SCR 0x0E << 8 /* serial clock rate : 1MHz */ |
#define | SSP_LBM 0x00 << 0 /* loopback mode : disabled */ |
#define | SSP_SSE 0x00 << 1 /* SSP enable : disabled */ |
#define | SSP_MS 0x00 << 2 /* master slave mode : master */ |
#define | SSP_SOD 0x00 << 3 /* slave output disable : disabled */ |
#define | SPI1_VIC_SLOT 7 |
Functions | |
static void | SPI1_ISR (void) |
void | ADS8344_init (void) |
static void | read_values (void) |
static void | send_request (void) |
void | ADS8344_start (void) |
Variables | |
bool | ADS8344_available |
uint16_t | ADS8344_values [NB_CHANNELS] |
static uint8_t | channel |
#define ADS8344Select | ( | ) | SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN) |
#define ADS8344Unselect | ( | ) | SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN) |
#define SSP_SOD 0x00 << 3 /* slave output disable : disabled */ |
void ADS8344_init | ( | void | ) |
Definition at line 88 of file ADS8344.c.
References _VIC_CNTL, ADS8344_available, ADS8344_SS_IODIR, ADS8344_SS_PIN, ADS8344Unselect, channel, PINSEL1, SPI1_ISR(), SPI1_VIC_SLOT, SSP_CPHA, SSP_CPOL, SSP_DSS, SSP_FRF, SSP_LBM, SSP_MS, SSP_SCR, SSP_SOD, SSPCPSR, SSPCR0, SSPCR1, VIC_BIT, VIC_ENABLE, VIC_SPI1, VICIntEnable, and VICIntSelect.
void ADS8344_start | ( | void | ) |
Definition at line 132 of file ADS8344.c.
References ADS8344Select, send_request(), SpiClearRti(), SpiEnable, and SpiEnableRti().
|
inlinestatic |
Definition at line 113 of file ADS8344.c.
References ADS8344_values, channel, foo, and SSPDR.
Referenced by SPI1_ISR().
|
inlinestatic |
Definition at line 122 of file ADS8344.c.
References channel, POWER_MODE, SGL_DIF, and SSPDR.
Referenced by ADS8344_start(), and SPI1_ISR().
|
static |
Definition at line 141 of file ADS8344.c.
References ADS8344_available, channel, ISR_ENTRY, ISR_EXIT, LED_TOGGLE, read_values(), send_request(), SpiClearRti(), and VICVectAddr.
Referenced by ADS8344_init().
bool ADS8344_available |
Definition at line 38 of file ADS8344.c.
Referenced by ADS8344_init(), and SPI1_ISR().
uint16_t ADS8344_values[NB_CHANNELS] |
Definition at line 39 of file ADS8344.c.
Referenced by read_values().
|
static |
Definition at line 80 of file ADS8344.c.
Referenced by adc1callback(), adc_regular_sequence(), adcISR0(), adcISR1(), ADS8344_init(), bf_adcGetChannel(), decode_hott_buffer(), decode_sbus_buffer(), get_pwm_input_duty_in_usec(), get_pwm_input_period_in_usec(), nps_radio_control_spektrum_init(), nullReadRawRC(), percent_from_rc(), pwm_sysfs_init(), read_values(), rxSpiReadRawRC(), send_request(), and SPI1_ISR().