monoZ docs
MZ_spi2_instance.h
Go to the documentation of this file.
1/*
2 * MZ_spi1.h
3 *
4 * Created on: 20-Jul-2021
5 * Author: Mahendra
6 */
7#include "MZ_error_handler.h"
8#include "MZ_public.h"
9
10#ifndef MZ_SPI2_INSTANCE_H_
11#define MZ_SPI2_INSTANCE_H_
12
13#define MZ_SPI2_INSTANCE (SPI2)
14#define MZ_SPI2_INIT_MODE (SPI_MODE_MASTER)
15#define MZ_SPI2_INIT_DIRECTION (SPI_DIRECTION_2LINES)
16#define MZ_SPI2_INIT_DATASIZE (SPI_DATASIZE_4BIT)
17#define MZ_SPI2_INIT_CLKPOLARITY (SPI_POLARITY_LOW)
18#define MZ_SPI2_INIT_CLKPHASE (SPI_PHASE_1EDGE)
19#define MZ_SPI2_INIT_NSS (SPI_NSS_SOFT)
20#define MZ_SPI2_INIT_BAUDRATEPRESCALER (SPI_BAUDRATEPRESCALER_2)
21#define MZ_SPI2_INIT_FIRSTBIT (SPI_FIRSTBIT_MSB)
22#define MZ_SPI2_INIT_TIMODE (SPI_TIMODE_DISABLE)
23#define MZ_SPI2_INIT_CRCCALCULATION (SPI_CRCCALCULATION_DISABLE)
24#define MZ_SPI2_INIT_CRCPOLYNOMIAL (7)
25#define MZ_SPI2_INIT_CRCLENGTH (SPI_CRC_LENGTH_DATASIZE)
26#define MZ_SPI2_INIT_NSSPMODE (SPI_NSS_PULSE_ENABLE)
27
28#define MZ_SPI_INSTANCE (_SPI2)
29
31
32#endif /* MZ_SPI1_INSTANCE_H_ */
monoZ Error Handler
mz_error_t
Enumeration of monoZ Error Flags.
monoZ Public All peripheral Configurations will send to monoZ library through this file
mz_error_t SPI2_init(void)