|
hal
Hardware Abstraction Layer
|
STM32F4 I2C HAL implementation. More...
#include "stm32f4xx.h"#include "i2c.h"#include "i2c_transaction_queue.h"#include "stm32f4_hal.h"#include <string.h>#include <stdbool.h>
Macros | |
| #define | SYS_FREQ_MHZ 16 |
| #define | I2C_DIRECTION_WRITE 0 |
| #define | I2C_DIRECTION_READ 1 |
| #define | _SET_ERROR_FLAG_AND_ABORT_TRANSACTION() |
Functions | |
| void | I2C1_EV_IRQHandler (void) |
| void | I2C1_ER_IRQHandler () |
| hal_status_t | hal_i2c_init () |
| Initialize the I2C Module. Must be called prior to using the I2C Module. More... | |
| hal_status_t | hal_i2c_submit_transaction (hal_i2c_txn_t *txn) |
| Submit a transaction to be processed by the driver. More... | |
| hal_status_t | hal_i2c_transaction_servicer () |
| Called periodically to manage the loading and unloading of transactions. More... | |
| void | _test_fixture_hal_i2c_reset_internals () |
| Just for testing. More... | |
STM32F4 I2C HAL implementation.
Copyright (c) 2025 Cory McKiel. Licensed under the MIT License. See LICENSE file in the project root.
| #define _SET_ERROR_FLAG_AND_ABORT_TRANSACTION | ( | ) |
| void _test_fixture_hal_i2c_reset_internals | ( | ) |
Just for testing.
| hal_status_t hal_i2c_init | ( | ) |
Initialize the I2C Module. Must be called prior to using the I2C Module.
| hal_status_t hal_i2c_submit_transaction | ( | hal_i2c_txn_t * | txn | ) |
Submit a transaction to be processed by the driver.
| txn | A reference to a transaction with the appropriate fields already filled out. See hal_i2c_txn_t for details about filling out the transaction correctly, as well as information about checking progress. |
| hal_status_t hal_i2c_transaction_servicer | ( | ) |
Called periodically to manage the loading and unloading of transactions.