![]() |
RTEMS 6.1
|
Raspberry Pi specific I2C definitions. More...
#include <dev/i2c/i2c.h>Go to the source code of this file.
Macros | |
I2C constants. | |
| #define | BSC_CORE_CLK_HZ 150000000 |
| BSC controller core clock rate in Hz. | |
| #define | DEFAULT_BUS_CLOCK 100000 |
| Default bus clock. | |
Functions | |
I2C directives. | |
| void | rpi_i2c_init (void) |
| Setups the Raspberry Pi GPIO header to activate the BSC I2C bus. | |
| int | rpi_i2c_register_bus (const char *bus_path, uint32_t bus_clock) |
| Registers the Raspberry Pi BSC I2C bus with the Linux I2C User-Space API. | |
Raspberry Pi specific I2C definitions.
| #define BSC_CORE_CLK_HZ 150000000 |
BSC controller core clock rate in Hz.
This is set to 150 MHz as per the BCM2835 datasheet.
| #define DEFAULT_BUS_CLOCK 100000 |
Default bus clock.
This sets the bus with a 100 kHz clock speed.
| int rpi_i2c_register_bus | ( | const char * | bus_path, |
| uint32_t | bus_clock | ||
| ) |
Registers the Raspberry Pi BSC I2C bus with the Linux I2C User-Space API.
| [in] | bus_path | Path to the bus device file. |
| [in] | bus_clock | Bus clock in Hz. |
| 0 | Bus registered successfully. |
| <0 | Could not register the bus. The return value is a negative errno code. |