Kinetis SDK v.2.0 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
LPUART µCOS/III Driver

Overview

Files

file  fsl_lpuart_ucosiii.h
 

Driver version

#define FSL_LPUART_UCOSIII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 LPUART µCOS-III driver version 2.0.0. More...
 

LPUART RTOS Operation

int LPUART_RTOS_Init (lpuart_rtos_handle_t *handle, lpuart_handle_t *t_handle, const struct rtos_lpuart_config *cfg)
 Initializes an LPUART instance for operation in RTOS. More...
 
int LPUART_RTOS_Deinit (lpuart_rtos_handle_t *handle)
 Deinitializes an LPUART instance for operation. More...
 

LPUART transactional Operation

int LPUART_RTOS_Send (lpuart_rtos_handle_t *handle, const uint8_t *buffer, uint32_t length)
 Send data in background. More...
 
int LPUART_RTOS_Receive (lpuart_rtos_handle_t *handle, uint8_t *buffer, uint32_t length, size_t *received)
 Receives data. More...
 

Macro Definition Documentation

#define FSL_LPUART_UCOSIII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Function Documentation

int LPUART_RTOS_Init ( lpuart_rtos_handle_t *  handle,
lpuart_handle_t *  t_handle,
const struct rtos_lpuart_config *  cfg 
)
Parameters
handleThe RTOS LPUART handle, the pointer to allocated space for RTOS context.
lpuart_t_handleThe pointer to allocated space where to store transactional layer internal state.
cfgThe pointer to the parameters required to configure the LPUART after initialization.
Returns
0 succeed, others failed
int LPUART_RTOS_Deinit ( lpuart_rtos_handle_t *  handle)

This function deinitializes the LPUART modulem, set all register value to reset value and releases the resources.

Parameters
handleThe RTOS LPUART handle.
int LPUART_RTOS_Send ( lpuart_rtos_handle_t *  handle,
const uint8_t *  buffer,
uint32_t  length 
)

This function sends data. It is synchronous API. If the HW buffer is full, the task is in the blocked state.

Parameters
handleThe RTOS LPUART handle.
bufferThe pointer to buffer to send.
lengthThe number of bytes to send.
int LPUART_RTOS_Receive ( lpuart_rtos_handle_t *  handle,
uint8_t *  buffer,
uint32_t  length,
size_t *  received 
)

It is synchronous API.

This function receives data from LPUART. If any data is immediately available it will be returned imidiately and the number of bytes received.

Parameters
handleThe RTOS LPUART handle.
bufferThe pointer to buffer where to write received data.
lengthThe number of bytes to receive.
receivedThe pointer to variable of size_t where the number of received data will be filled.