Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
max3100_hw.c File Reference
#include "LPC21xx.h"
#include "interrupt_hw.h"
#include "max3100_hw.h"
#include "ap_downlink.h"
#include "mcu_periph/uart.h"
+ Include dependency graph for max3100_hw.c:

Go to the source code of this file.

Macros

#define PINSEL1_SCK   (2 << 2)
 
#define PINSEL1_MISO   (2 << 4)
 
#define PINSEL1_MOSI   (2 << 6)
 
#define PINSEL1_SSEL   (2 << 8)
 
#define SSP_DSS   0x0F << 0 /* data size : 16 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 : 0 */
 
#define SSP_SCR   0x0F << 8 /* serial clock rate : 29.3kHz, SSP input clock / 16 */
 
#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 : don't care when master */
 
#define SSPCPSR_VAL   0x04
 

Functions

static void EXTINT_ISR (void)
 
void SPI1_ISR (void)
 
void max3100_debug (void)
 

Variables

uint8_t volatile max3100_status
 
bool volatile max3100_data_available
 
bool volatile max3100_transmit_buffer_empty
 
uint8_t volatile max3100_tx_insert_idx
 
uint8_t volatile max3100_tx_extract_idx
 
uint8_t volatile max3100_rx_insert_idx
 
uint8_t volatile max3100_rx_extract_idx
 
uint8_t volatile max3100_tx_buf [MAX3100_TX_BUF_LEN]
 
uint8_t volatile max3100_rx_buf [MAX3100_RX_BUF_LEN]
 
bool read_bytes = false
 

Macro Definition Documentation

#define PINSEL1_MISO   (2 << 4)

Referenced by EXTINT_ISR().

#define PINSEL1_MOSI   (2 << 6)

Referenced by EXTINT_ISR().

#define PINSEL1_SCK   (2 << 2)

Referenced by EXTINT_ISR().

#define PINSEL1_SSEL   (2 << 8)
#define SSP_CPHA   0x00 << 7 /* clock phase : 0 */

Referenced by EXTINT_ISR().

#define SSP_CPOL   0x00 << 6 /* clock polarity : idle low */

Referenced by EXTINT_ISR().

#define SSP_DSS   0x0F << 0 /* data size : 16 bits */

Referenced by EXTINT_ISR().

#define SSP_FRF   0x00 << 4 /* frame format : SPI */

Referenced by EXTINT_ISR().

#define SSP_LBM   0x00 << 0 /* loopback mode : disabled */

Referenced by EXTINT_ISR().

#define SSP_MS   0x00 << 2 /* master slave mode : master */

Referenced by EXTINT_ISR().

#define SSP_SCR   0x0F << 8 /* serial clock rate : 29.3kHz, SSP input clock / 16 */

Referenced by EXTINT_ISR().

#define SSP_SOD   0x00 << 3 /* slave output disable : don't care when master */

Referenced by EXTINT_ISR().

#define SSP_SSE   0x00 << 1 /* SSP enable : disabled */
#define SSPCPSR_VAL   0x04

Referenced by EXTINT_ISR().

Function Documentation

void max3100_debug ( void  )

Definition at line 163 of file max3100_hw.c.

Referenced by max3100_event().

+ Here is the caller graph for this function:

Variable Documentation

bool volatile max3100_data_available

Definition at line 34 of file max3100_hw.c.

Referenced by EXTINT_ISR(), and max3100_event().

uint8_t volatile max3100_rx_buf[MAX3100_RX_BUF_LEN]

Definition at line 41 of file max3100_hw.c.

Referenced by SPI1_ISR().

uint8_t volatile max3100_rx_extract_idx

Definition at line 38 of file max3100_hw.c.

Referenced by EXTINT_ISR().

uint8_t volatile max3100_rx_insert_idx

Definition at line 38 of file max3100_hw.c.

Referenced by EXTINT_ISR(), and SPI1_ISR().

uint8_t volatile max3100_status
bool volatile max3100_transmit_buffer_empty

Definition at line 35 of file max3100_hw.c.

Referenced by EXTINT_ISR(), max3100_flush(), and SPI1_ISR().

uint8_t volatile max3100_tx_buf[MAX3100_TX_BUF_LEN]

Definition at line 40 of file max3100_hw.c.

Referenced by max3100_flush(), and max3100_putchar().

uint8_t volatile max3100_tx_extract_idx

Definition at line 37 of file max3100_hw.c.

Referenced by EXTINT_ISR(), and max3100_flush().

uint8_t volatile max3100_tx_insert_idx

Definition at line 37 of file max3100_hw.c.

Referenced by EXTINT_ISR(), max3100_flush(), and max3100_putchar().

bool read_bytes = false

Definition at line 44 of file max3100_hw.c.

Referenced by max3100_event(), and SPI1_ISR().