Contents
I2c_ds1307_rtc example
This example demonstrates use of the i2c
driver (Inter-Integrated Circuit) in KasperskyOS.
In this example, the I2cClient
program uses the i2c
driver interface.
The client library of the i2c
driver is statically linked to the I2cClient
program. The i2c
driver implementation uses a BSP (Board Support Platform) subsystem for configuring clock frequencies (Clocks) and pins multiplexing (PinMux). Therefore, to ensure correct operation of the driver, you need to do the following:
- Link the
I2cClient
program to thei2c_CLIENT_LIB
client library. - Link the
I2cClient
program to thebsp_CLIENT_LIB
client library. - Create an IPC channel between the
I2cClient
program and thekl.drivers.I2C
driver. - Create an IPC channel between the
I2cClient
program and thekl.drivers.BSP
driver.
The CMake
system, which is included with KasperskyOS Community Edition, is used to build and run the example.
Example files
The code of the example and build scripts are available at the following path:
Building and running example
This example is intended to run only on Raspberry Pi. For the example to work correctly, you must connect a DS1307Z real-time clock module to the i2c port.
See Building and running examples section.
Page top