RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
imxrt
mcux-sdk
drivers
lpspi
fsl_lpspi_freertos.h
1
/*
2
* Copyright (c) 2015, Freescale Semiconductor, Inc.
3
* Copyright 2016-2022 NXP
4
* All rights reserved.
5
*
6
* SPDX-License-Identifier: BSD-3-Clause
7
*/
8
#ifndef __FSL_LPSPI_FREERTOS_H__
9
#define __FSL_LPSPI_FREERTOS_H__
10
11
#include "FreeRTOS.h"
12
#include "portable.h"
13
#include "semphr.h"
14
15
#include "fsl_lpspi.h"
16
21
22
/**********************************************************************************************************************
23
* Definitions
24
*********************************************************************************************************************/
25
29
#define FSL_LPSPI_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 3, 1))
31
36
typedef
struct
_lpspi_rtos_handle
37
{
38
LPSPI_Type
*base;
39
lpspi_master_handle_t
drv_handle;
40
status_t
async_status;
41
SemaphoreHandle_t
mutex
;
42
SemaphoreHandle_t event;
43
} lpspi_rtos_handle_t;
45
46
/**********************************************************************************************************************
47
* API
48
*********************************************************************************************************************/
49
50
#if defined(__cplusplus)
51
extern
"C"
{
52
#endif
53
58
70
status_t
LPSPI_RTOS_Init
(lpspi_rtos_handle_t *handle,
71
LPSPI_Type
*base,
72
const
lpspi_master_config_t
*masterConfig,
73
uint32_t srcClock_Hz);
74
82
status_t
LPSPI_RTOS_Deinit
(lpspi_rtos_handle_t *handle);
83
93
status_t
LPSPI_RTOS_Transfer
(lpspi_rtos_handle_t *handle,
lpspi_transfer_t
*transfer);
94
98
99
#if defined(__cplusplus)
100
}
101
#endif
102
106
107
#endif
/* __FSL_LPSPI_FREERTOS_H__ */
status_t
int32_t status_t
Type used for all status and error return values.
Definition
fsl_common.h:225
lpspi_master_handle_t
struct _lpspi_master_handle lpspi_master_handle_t
Forward declaration of the _lpspi_master_handle typedefs.
Definition
fsl_lpspi.h:309
lpspi_master_config_t
struct _lpspi_master_config lpspi_master_config_t
LPSPI master configuration structure.
lpspi_transfer_t
struct _lpspi_transfer lpspi_transfer_t
LPSPI master/slave transfer structure.
LPSPI_RTOS_Init
status_t LPSPI_RTOS_Init(lpspi_rtos_handle_t *handle, LPSPI_Type *base, const lpspi_master_config_t *masterConfig, uint32_t srcClock_Hz)
Initializes LPSPI.
LPSPI_RTOS_Transfer
status_t LPSPI_RTOS_Transfer(lpspi_rtos_handle_t *handle, lpspi_transfer_t *transfer)
Performs SPI transfer.
LPSPI_RTOS_Deinit
status_t LPSPI_RTOS_Deinit(lpspi_rtos_handle_t *handle)
Deinitializes the LPSPI.
LPSPI_Type
Definition
MIMXRT1052.h:30457
mutex
Definition
mutex.h:4
Generated by
1.18.0