36#include "stm32l4xx_hal_spi.h"
40#define SPI_APP_STACK_SIZE (1024)
41#define SPI_TX_TIME (pdMS_TO_TICKS(60000))
42#define SPI_TX_SIZE (10)
120 if(
MZ_OK != SPI1_init())
unsigned char mzUint8
1 Byte data type
mz_error_t
Enumeration of monoZ Error Flags.
This file contains all the functionalities for SPI protocol.
static mz_thread_t spi_thread_id
static StaticTask_t spi_cb_mem
#define SPI_APP_STACK_SIZE
static mz_semaphore_t spi_sema_id
static void spi_app(void *arg)
create the timer and starts if main RTOS scheduler started
static mzUint8 send_data[SPI_TX_SIZE]
static void timer_cb(TimerHandle_t xTimer)
Timer callback function for transmission of the data.
static StackType_t spi_stack[SPI_APP_STACK_SIZE]
mz_error_t spi_app_init(void)
monoZ system CMSIS OS2 This is an abstraction layer and includes FreeRTOS configuration,...
osSemaphoreId_t mz_semaphore_t
mz_semaphore_t variable of type osSemaphoreId_t
osThreadId_t mz_thread_t
mz_thread_t variable of type osThreadId_t
This file contains APIs for create,delete,start and stop of timers. Maximum 5 timers can be created....
int mz_puts(void *__ch)
This function prints the given string.
uint8_t mz_sem_create(mz_semaphore_t *c, uint8_t cnt, uint8_t init)
This function is used to create and initialize the semaphore object Create and Initialize a Semaphore...
mz_error_t MZ_SPI_Transmit_IT(uint8_t spi_no, uint8_t *pData, uint16_t Size)
This function is used to transmit data using SPI in interrupt mode.
uint8_t mz_thread_create(mz_thread_t *t, const char *name, mz_fn thread_func, void *const arg, mz_thread_prio_t prio, StackType_t *stack_mem, size_t stack_size, StaticTask_t *cb_mem, uint32_t cb_size)
This function is used to check the message queue object validity Create a thread and add it to Active...
mz_error_t mz_tm_create_start_recursive(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create and Start One Shot Timers.