Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
max11040_hw.h File Reference
#include "LPC21xx.h"
#include "ssp_hw.h"
#include "generated/airframe.h"
#include <BOARD_CONFIG>
+ Include dependency graph for max11040_hw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAXM_DIVISOR_128   2
 
#define MAXM_DIVISOR_256   3
 
#define MAXM_DIVISOR_512   4
 
#define MAXM_DIVISOR_1024   5
 
#define MAXM_DIVISOR   MAXM_DIVISOR_512
 
#define SSP_CLOCK   468750
 
#define SSP_DDS   0x07 << 0 /* data size : 8 bits */
 
#define SSP_FRF   0x00 << 4 /* frame format : SPI */
 
#define SSP_CPOL   0x00 << 6 /* clock polarity : data captured on first clock transition */
 
#define SSP_CPHA   0x01 << 7 /* clock phase : SCK idles low */
 
#define SSP_SCR   0x00 << 8 /* serial clock rate : divide by 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 SSPCR0_VAL   (SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR )
 
#define SSPCR1_VAL   (SSP_LBM | SSP_SSE | SSP_MS | SSP_SOD )
 
#define SSP_PINSEL1_SCK   (2<<2)
 
#define SSP_PINSEL1_MISO   (2<<4)
 
#define SSP_PINSEL1_MOSI   (2<<6)
 
#define SSP_PINSEL1_SSEL   (2<<8)
 
#define SSP_Enable()   SetBit(SSPCR1, SSE);
 
#define SSP_Disable()   ClearBit(SSPCR1, SSE);
 
#define SSP_EnableRxi()   SetBit(SSPIMSC, RXIM)
 
#define SSP_DisableRxi()   ClearBit(SSPIMSC, RXIM)
 
#define SSP_ClearRxi()   SetBit(SSPICR, RXIM);
 
#define SSP_EnableTxi()   SetBit(SSPIMSC, TXIM)
 
#define SSP_DisableTxi()   ClearBit(SSPIMSC, TXIM)
 
#define SSP_ClearTxi()   SetBit(SSPICR, TXIM);
 
#define SSP_EnableRti()   SetBit(SSPIMSC, RTIM);
 
#define SSP_DisableRti()   ClearBit(SSPIMSC, RTIM);
 
#define SSP_ClearRti()   SetBit(SSPICR, RTIC);
 
#define MaxmSelect()   SetBit(MAXM_SS_IOCLR, MAXM_SS_PIN)
 
#define MaxmUnselect()   SetBit(MAXM_SS_IOSET, MAXM_SS_PIN)
 

Functions

void max11040_hw_init (void)
 

Macro Definition Documentation

#define MAXM_DIVISOR   MAXM_DIVISOR_512

Definition at line 17 of file max11040_hw.h.

#define MAXM_DIVISOR_1024   5

Definition at line 15 of file max11040_hw.h.

#define MAXM_DIVISOR_128   2

Definition at line 12 of file max11040_hw.h.

#define MAXM_DIVISOR_256   3

Definition at line 13 of file max11040_hw.h.

#define MAXM_DIVISOR_512   4

Definition at line 14 of file max11040_hw.h.

#define MaxmSelect ( )    SetBit(MAXM_SS_IOCLR, MAXM_SS_PIN)

Definition at line 55 of file max11040_hw.h.

Referenced by EXTINT_ISR().

#define MaxmUnselect ( )    SetBit(MAXM_SS_IOSET, MAXM_SS_PIN)

Definition at line 56 of file max11040_hw.h.

Referenced by SSP_ISR().

#define SSP_ClearRti ( )    SetBit(SSPICR, RTIC);

Definition at line 53 of file max11040_hw.h.

Referenced by ADS8344_start(), max11040_hw_init(), SPI1_ISR(), and SSP_ISR().

#define SSP_ClearRxi ( )    SetBit(SSPICR, RXIM);

Definition at line 47 of file max11040_hw.h.

Referenced by SSP_ISR().

#define SSP_ClearTxi ( )    SetBit(SSPICR, TXIM);

Definition at line 50 of file max11040_hw.h.

#define SSP_CLOCK   468750

Definition at line 20 of file max11040_hw.h.

#define SSP_CPHA   0x01 << 7 /* clock phase : SCK idles low */

Definition at line 26 of file max11040_hw.h.

#define SSP_CPOL   0x00 << 6 /* clock polarity : data captured on first clock transition */

Definition at line 25 of file max11040_hw.h.

#define SSP_DDS   0x07 << 0 /* data size : 8 bits */

Definition at line 23 of file max11040_hw.h.

#define SSP_Disable ( )    ClearBit(SSPCR1, SSE);

Definition at line 44 of file max11040_hw.h.

#define SSP_DisableRti ( )    ClearBit(SSPIMSC, RTIM);

Definition at line 52 of file max11040_hw.h.

#define SSP_DisableRxi ( )    ClearBit(SSPIMSC, RXIM)

Definition at line 46 of file max11040_hw.h.

#define SSP_DisableTxi ( )    ClearBit(SSPIMSC, TXIM)

Definition at line 49 of file max11040_hw.h.

#define SSP_Enable ( )    SetBit(SSPCR1, SSE);

Definition at line 43 of file max11040_hw.h.

Referenced by ADS8344_start(), and max11040_hw_init().

#define SSP_EnableRti ( )    SetBit(SSPIMSC, RTIM);

Definition at line 51 of file max11040_hw.h.

Referenced by ADS8344_start(), and max11040_hw_init().

#define SSP_EnableRxi ( )    SetBit(SSPIMSC, RXIM)

Definition at line 45 of file max11040_hw.h.

#define SSP_EnableTxi ( )    SetBit(SSPIMSC, TXIM)

Definition at line 48 of file max11040_hw.h.

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

Definition at line 24 of file max11040_hw.h.

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

Definition at line 30 of file max11040_hw.h.

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

Definition at line 32 of file max11040_hw.h.

#define SSP_PINSEL1_MISO   (2<<4)

Definition at line 39 of file max11040_hw.h.

#define SSP_PINSEL1_MOSI   (2<<6)

Definition at line 40 of file max11040_hw.h.

#define SSP_PINSEL1_SCK   (2<<2)

Definition at line 38 of file max11040_hw.h.

#define SSP_PINSEL1_SSEL   (2<<8)

Definition at line 41 of file max11040_hw.h.

#define SSP_SCR   0x00 << 8 /* serial clock rate : divide by 16 */

Definition at line 27 of file max11040_hw.h.

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

Definition at line 33 of file max11040_hw.h.

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

Definition at line 31 of file max11040_hw.h.

#define SSPCR0_VAL   (SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR )

Definition at line 35 of file max11040_hw.h.

#define SSPCR1_VAL   (SSP_LBM | SSP_SSE | SSP_MS | SSP_SOD )

Definition at line 36 of file max11040_hw.h.

Function Documentation

void max11040_hw_init ( void  )