spi....
strtoul 是一个在C语言标准库中定义的函数,用于将字符串转换为无符号长整数(unsigned long)。以下是关于 strtoul 函数的详细说明:
函数原型:
cunsigned long int strtoul(const char *str, char **endptr, int base);
/*初始化
spi_transferx t
t.tx_buf = ker_buf;
t.len= 2;
err = spi_sync_transfer(g_spi, &t, 1);
&ecspil (
pinctr1-names ="default";
pinctr1-0 = <&pinctrl_ecspi1>;
fs1,spi-num-chipselects =<2>;
cs-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>,<&gpio4 24 GPIO_ACTIVE_LOW>;
status = "okay";
dac: dac {
compatible ="100ask,spidev";
reg = <0>;选片选引脚
spi-max-frequency = <1000000>;一般都是这
{}
probe的存值
1在i2c存client
2在spi存spi
<