Get 25% off all test packages.

#include "my_sensor_driver.h" #include "i2c_secure_driver.h" // hypothetical secure I2C driver psa_status_t my_sensor_read(int32_t *temperature) raw[1]); return PSA_SUCCESS;

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 :

#include "psa/service.h" #include "my_sensor_driver.h" psa_signal_t signals = 0;

name: MY_SENSOR type: APPLICATION priority: MEDIUM services: - name: my_sensor_read sid: 0x000000A0 version: 1 non_secure_clients: false # only secure clients signals: - signal: my_sensor_read_signal my_sensor_driver.c :

my_sensor_partition.c :

To allow Non-Secure access, set non_secure_clients: true in the manifest. Then generate veneers. Non-secure client code: #include "psa_manifest/sid.h" // Auto-generated #include "my_sensor_partition_veneers.h" void app_main() int32_t temp; psa_status_t status = my_sensor_read(&temp); if (status == PSA_SUCCESS) printf("Temp: %d\n", temp);