【官方】核桃派2B功能建议反馈贴

Please tell me if it is possible to display your bootlogo when loading? The bootlogo=enable option does not lead to anything. Please add details on the product page.

建议像其他pi一样,在图形界面的文件管理器里,鼠标右键加一个“在此位置打开终端”,这样开发工作方便一点~

Walnut Pi 2B does not have the boot LOGO function.

使用官方SPI调试时,SPI MOSI没有数据发出,后面尝试添加错误信息打印

添加了头文件#include <errno.h>和#include <string.h>
代码如下:
int spi_transfer(int fd, uint8_t *tx_buf, uint8_t *rx_buf, int len)
{
struct spi_ioc_transfer transfer;
memset(&transfer, 0, sizeof(struct spi_ioc_transfer));

transfer.tx_buf = (unsigned long)tx_buf;
transfer.rx_buf = (unsigned long)rx_buf;
transfer.len = len;
transfer.delay_usecs = 0;  // 发送完成后的延时
transfer.speed_hz = SPEED;
transfer.bits_per_word = BITS_PER_WORD;
transfer.tx_nbits = 1;  // 单线制
transfer.rx_nbits = 1;  // 单线制

int res = ioctl(fd, SPI_IOC_MESSAGE(1), &transfer);  // 触发transfer
if (res < 0) printf("ioctl : %s\n", strerror(errno));
return res;

}

添加后会打印出
ioctl : Invalid argument
请问如何解决