__BLOBMSG_TYPE_LAST, BLOBMSG_TYPE_LAST= __BLOBMSG_TYPE_LAST -1, BLOBMSG_TYPE_BOOL=BLOBMSG_TYPE_INT8, };structblobmsg_hdr { uint16_t namelen; uint8_t name[]; } __packed; // 解析blobmsg列表structblobmsg_policy {constchar*name; // 与blobmsg_hdr->name对应enumblobmsg_type type; // ...
2:BLOBMSG_TYPE_UNSPEC, 3:BLOBMSG_TYPE_ARRAY, 4:BLOBMSG_TYPE_TABLE, 5:BLOBMSG_TYPE_STRING, 6:BLOBMSG_TYPE_INT64, 7:BLOBMSG_TYPE_INT32, 8:BLOBMSG_TYPE_INT16, 9:BLOBMSG_TYPE_INT8, 10:__BLOBMSG_TYPE_LAST, 11:BLOBMSG_TYPE_LAST = __BLOBMSG_TYPE_LAST - 1, 12:BLOBMSG_TYPE_BOOL = BLOB...
case BLOBMSG_TYPE_BOOL: sprintf(buf, "%s", *(uint8_t *)data ? "true" : "false"); break; case BLOBMSG_TYPE_INT16: sprintf(buf, "%d", be16_to_cpu(*(uint16_t *)data)); break; case BLOBMSG_TYPE_INT32: sprintf(buf, "%d", (int32_t) be32_to_cpu(*(uint32_t ...