|
hal
Hardware Abstraction Layer
|
FIFO data structure used to store handles to client I2C transaction requests. More...
#include "i2c.h"

Go to the source code of this file.
Macros | |
| #define | I2C_TRANSACTION_QUEUE_SIZE 10 |
| Adjust to increase/decrease the queue size. | |
Enumerations | |
| enum | i2c_queue_status_t { _I2C_QUEUE_STATUS_ENUM_MIN = 0 , I2C_QUEUE_STATUS_SUCCESS = _I2C_QUEUE_STATUS_ENUM_MIN , I2C_QUEUE_STATUS_FAIL , I2C_QUEUE_STATUS_QUEUE_FULL , I2C_QUEUE_STATUS_QUEUE_EMPTY , _I2C_QUEUE_STATUS_ENUM_MAX } |
| Possible return types for queue operations. More... | |
Functions | |
| i2c_queue_status_t | i2c_transaction_queue_add (hal_i2c_txn_t *txn) |
| Add a transaction to the queue. More... | |
| i2c_queue_status_t | i2c_transaction_queue_get_next (hal_i2c_txn_t **txn) |
| Get the next transaction from the queue. Removes the transaction from the queue. More... | |
| void | i2c_transaction_queue_reset () |
| Resets the queue. More... | |
FIFO data structure used to store handles to client I2C transaction requests.
Copyright (c) 2025 Cory McKiel. Licensed under the MIT License. See LICENSE file in the project root.
| enum i2c_queue_status_t |
Possible return types for queue operations.
| i2c_queue_status_t i2c_transaction_queue_add | ( | hal_i2c_txn_t * | txn | ) |
Add a transaction to the queue.
| txn | A reference to the transaction to queue. |
| i2c_queue_status_t i2c_transaction_queue_get_next | ( | hal_i2c_txn_t ** | txn | ) |
Get the next transaction from the queue. Removes the transaction from the queue.
| txn | A reference to a handle type for a transaction. |
| void i2c_transaction_queue_reset | ( | ) |
Resets the queue.
It resets all internal variables that manage the queue so it will be "like new".