内核报错信息查看
include/uapi/asm-generic/errno-base.h
设备树的读取操作
struct device_node *nc
of_property_read_bool(nc, "spi-cpha")
if (!of_node_name_eq(nc, "slave"))
rc = of_property_read_u32(nc, "reg", &value);
if (!of_property_read_u32(nc, "spi-max-frequency", &value))
获取字符串:
//dts
spi-product = "rtk8370";
// c
ret = of_property_read_string_array(spi->dev.of_node, "spi-product", spiProduct, 1);
printk("#### zkwlfile:%s func:%s line:%d ret:%d spiProduct->%s \n",
__FILE__, __func__, __LINE__, ret, spiProduct[0]);
linux符号操作
用于设置全局变量操作
https://blog.csdn.net/u010798513/article/details/144257206https://blog.csdn.net/u010798513/article/details/144257206