boolblob_check_type(constvoid*ptr, unsignedintlen,inttype);boolblob_attr_equal(conststructblob_attr *a1,conststructblob_attr *a2); 初始化和销毁 blob_buf一般声明为本地静态变量,id一般使用0(BLOBMSG_TYPE_UNSPEC)来初始化。 /** * 初始化BLOB buffer*/intblob_buf_init(structblob_buf *buf,intid...
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 = BLOBMSG_TYPE_INT8, 13:}; 4.基本操作 1:/** 2:* 根据BLOB消息名字长度计算出blobmsg头部大小 3:*/ 4:staticinlineintbl...
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 ...
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 = BLOBMSG_TYPE_INT8, 13:}; 4.基本操作 1:/** 2:* 根据BLOB消息名字长度计算出blobmsg头部大小 3:*/ 4:staticinlineintbl...