 |
Software APIs
|
Go to the documentation of this file.
5 #ifndef OPENTITAN_SW_DEVICE_SCA_LIB_SIMPLE_SERIAL_H_
6 #define OPENTITAN_SW_DEVICE_SCA_LIB_SIMPLE_SERIAL_H_
11 #include "sw/device/lib/base/status.h"
29 #define SS_CHECK(condition) \
32 simple_serial_send_status(kSimpleSerialError); \
40 #define SS_CHECK_STATUS_OK(expr) \
42 status_t status_ = expr; \
43 if (!(status_ok(status_))) { \
44 unsigned char *buf = (unsigned char *)&status_.value; \
45 simple_serial_send_packet('z', buf, sizeof(status_.value)); \
53 #define SS_CHECK_DIF_OK(dif_call) \
55 if (dif_call != kDifOk) { \
56 simple_serial_send_status(kSimpleSerialError); \
66 kSimpleSerialError = 1,