RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
imxrt
mcux-sdk
drivers
lpi2c
fsl_lpi2c_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_LPI2C_FREERTOS_H__
9
#define __FSL_LPI2C_FREERTOS_H__
10
11
#include "FreeRTOS.h"
12
#include "portable.h"
13
#include "semphr.h"
14
15
#include "fsl_lpi2c.h"
16
21
22
/*******************************************************************************
23
* Definitions
24
******************************************************************************/
25
29
#define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 3, 2))
31
36
typedef
struct
_lpi2c_rtos_handle
37
{
38
LPI2C_Type
*base;
39
lpi2c_master_handle_t drv_handle;
40
status_t
async_status;
41
SemaphoreHandle_t
mutex
;
42
SemaphoreHandle_t semaphore;
43
} lpi2c_rtos_handle_t;
45
46
/*******************************************************************************
47
* API
48
******************************************************************************/
49
50
#if defined(__cplusplus)
51
extern
"C"
{
52
#endif
53
58
70
status_t
LPI2C_RTOS_Init
(lpi2c_rtos_handle_t *handle,
71
LPI2C_Type
*base,
72
const
lpi2c_master_config_t
*masterConfig,
73
uint32_t srcClock_Hz);
74
82
status_t
LPI2C_RTOS_Deinit
(lpi2c_rtos_handle_t *handle);
83
93
status_t
LPI2C_RTOS_Transfer
(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer);
94
98
99
#if defined(__cplusplus)
100
}
101
#endif
102
106
107
#endif
/* __FSL_LPI2C_FREERTOS_H__ */
status_t
int32_t status_t
Type used for all status and error return values.
Definition
fsl_common.h:225
LPI2C_RTOS_Init
status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t srcClock_Hz)
Initializes LPI2C.
LPI2C_RTOS_Transfer
status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer)
Performs I2C transfer.
LPI2C_RTOS_Deinit
status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle)
Deinitializes the LPI2C.
lpi2c_master_config_t
struct _lpi2c_master_config lpi2c_master_config_t
Structure with settings to initialize the LPI2C master module.
LPI2C_Type
Definition
MIMXRT1052.h:29282
mutex
Definition
mutex.h:4
Generated by
1.18.0