monoZ docs
MZ_spi2_instance.h File Reference
#include "MZ_error_handler.h"
#include "MZ_public.h"

Go to the source code of this file.

Macros

#define MZ_SPI2_INSTANCE   (SPI2)
 
#define MZ_SPI2_INIT_MODE   (SPI_MODE_MASTER)
 
#define MZ_SPI2_INIT_DIRECTION   (SPI_DIRECTION_2LINES)
 
#define MZ_SPI2_INIT_DATASIZE   (SPI_DATASIZE_4BIT)
 
#define MZ_SPI2_INIT_CLKPOLARITY   (SPI_POLARITY_LOW)
 
#define MZ_SPI2_INIT_CLKPHASE   (SPI_PHASE_1EDGE)
 
#define MZ_SPI2_INIT_NSS   (SPI_NSS_SOFT)
 
#define MZ_SPI2_INIT_BAUDRATEPRESCALER   (SPI_BAUDRATEPRESCALER_2)
 
#define MZ_SPI2_INIT_FIRSTBIT   (SPI_FIRSTBIT_MSB)
 
#define MZ_SPI2_INIT_TIMODE   (SPI_TIMODE_DISABLE)
 
#define MZ_SPI2_INIT_CRCCALCULATION   (SPI_CRCCALCULATION_DISABLE)
 
#define MZ_SPI2_INIT_CRCPOLYNOMIAL   (7)
 
#define MZ_SPI2_INIT_CRCLENGTH   (SPI_CRC_LENGTH_DATASIZE)
 
#define MZ_SPI2_INIT_NSSPMODE   (SPI_NSS_PULSE_ENABLE)
 
#define MZ_SPI_INSTANCE   (_SPI2)
 

Functions

mz_error_t SPI2_init (void)
 

Macro Definition Documentation

◆ MZ_SPI2_INSTANCE

#define MZ_SPI2_INSTANCE   (SPI2)

Definition at line 13 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_MODE

#define MZ_SPI2_INIT_MODE   (SPI_MODE_MASTER)

Definition at line 14 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_DIRECTION

#define MZ_SPI2_INIT_DIRECTION   (SPI_DIRECTION_2LINES)

Definition at line 15 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_DATASIZE

#define MZ_SPI2_INIT_DATASIZE   (SPI_DATASIZE_4BIT)

Definition at line 16 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_CLKPOLARITY

#define MZ_SPI2_INIT_CLKPOLARITY   (SPI_POLARITY_LOW)

Definition at line 17 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_CLKPHASE

#define MZ_SPI2_INIT_CLKPHASE   (SPI_PHASE_1EDGE)

Definition at line 18 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_NSS

#define MZ_SPI2_INIT_NSS   (SPI_NSS_SOFT)

Definition at line 19 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_BAUDRATEPRESCALER

#define MZ_SPI2_INIT_BAUDRATEPRESCALER   (SPI_BAUDRATEPRESCALER_2)

Definition at line 20 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_FIRSTBIT

#define MZ_SPI2_INIT_FIRSTBIT   (SPI_FIRSTBIT_MSB)

Definition at line 21 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_TIMODE

#define MZ_SPI2_INIT_TIMODE   (SPI_TIMODE_DISABLE)

Definition at line 22 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_CRCCALCULATION

#define MZ_SPI2_INIT_CRCCALCULATION   (SPI_CRCCALCULATION_DISABLE)

Definition at line 23 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_CRCPOLYNOMIAL

#define MZ_SPI2_INIT_CRCPOLYNOMIAL   (7)

Definition at line 24 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_CRCLENGTH

#define MZ_SPI2_INIT_CRCLENGTH   (SPI_CRC_LENGTH_DATASIZE)

Definition at line 25 of file MZ_spi2_instance.h.

◆ MZ_SPI2_INIT_NSSPMODE

#define MZ_SPI2_INIT_NSSPMODE   (SPI_NSS_PULSE_ENABLE)

Definition at line 26 of file MZ_spi2_instance.h.

◆ MZ_SPI_INSTANCE

#define MZ_SPI_INSTANCE   (_SPI2)

Definition at line 28 of file MZ_spi2_instance.h.

Function Documentation

◆ SPI2_init()

mz_error_t SPI2_init ( void  )

Definition at line 47 of file MZ_spi2_instance.c.