Tfm Driver | Pro & Limited

my_sensor_partition/ ├── CMakeLists.txt ├── my_sensor_driver.h ├── my_sensor_driver.c ├── my_sensor_partition.c └── my_sensor_partition.yaml my_sensor_partition.yaml :

while (1) signals = psa_wait(PSA_WAIT_ANY, BLOCKING); if (signals & MY_SENSOR_READ_SIGNAL) psa_msg_t msg; psa_get(MY_SENSOR_READ_SIGNAL, &msg); int32_t temp; my_sensor_read(&temp); psa_write(msg.handle, 0, &temp, sizeof(temp)); psa_reply(msg.handle, PSA_SUCCESS); tfm driver

#include "my_sensor_driver.h" #include "i2c_secure_driver.h" // hypothetical secure I2C driver psa_status_t my_sensor_read(int32_t *temperature) uint8_t raw[2]; psa_status_t status = i2c_secure_read(MY_SENSOR_ADDR, 0x00, raw, 2); if (status != PSA_SUCCESS) return status; *temperature = (int16_t)((raw[0] << 8) my_sensor_partition.c : my_sensor_partition/ ├── CMakeLists

#include "psa/service.h" #include "my_sensor_driver.h" psa_signal_t signals = 0; if (signals & MY_SENSOR_READ_SIGNAL) psa_msg_t msg