|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pdPASS is returned if the request code was processed successfully. pdFAIL is returned in other cases.
All these code examples assume the pxPort descriptor has already been opened, and is valid. The example 1 code snippet demonstrates how to configure a peripheral to use the zero copy transfer mode. The pvValue parameter is not used with this request, so is set to NULL.
The example 2 code snippet demonstrates how to configure a peripheral's write timeout. In this case, the pvValue parameter is used to pass the timeout value in ticks. The constant portTICK_PERIOD_MS is used to convert 200 milliseconds into ticks.
The example 3 code snippet demonstrates how to set the slave address associated with an I2C port. In this case, the pvValue parameter is used to pass the slave address to use, which is 0x20.
Request Code ReferenceRequest codes that set the transfer mode to useThe following request codes are used to set the transfer mode. The board support package documentation details which transfer modes are applicable to which peripherals.
Request codes that affect the behaviour of a transfer modeThe following request codes are specific to one or more transfer modes.
Request codes that affect the behaviour of more than one type of peripheralRequest codes listed here are applicable to more than one peripheral type. The board support package documentation details which request codes are applicable to which peripheral.
SPI specific request codes
I2C specific request codes
|
[ Back to the top ]
[ About FreeRTOS ]
[ Privacy ]
[ FreeRTOS+ Sitemap ]
[ Main FreeRTOS Sitemap ]
[
]
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|