For SPI communication between RFID RC522 and BeagleBone board, SPI communication initialization, mode setting, maximum transmission rate setting, and data transmission/reception code were written and executed.
This project was based on vscode and pulled the glibc github.
However, at this time, a cannot open source file "libioP.h" error occurred.
Accordingly, the includepath of vscode's c/c++ configurations was modified as follows to refer to the path /home/debian/RFID/libio where libioP.h exists.
${workspaceFolder}/**
${workspaceFolder}/RFID/libio/**
At this time, the current path is /home/debian.
I added the path like this, but the related error didn't go away.
The problem above is that when I use the code below I get an error that the source file cannot be opened
snprintf(ss_gpio_path, sizeof(ss_gpio_path), "/sys/class/gpio/gpio%d/direction", SS_PIN);
In addition, if the code below is used, the following includePath error occurs.
// initialize SPI communication
int SpiInit() {
spi_fd = open(SPI_DEVICE, O_RDWR);
if (spi_fd < 0) {
printf("Failed to open SPI device");
return -1;
}
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/debian/sysdeps/unix/sysv/linux/open64.c).
I wrote the hint ${workspaceFolder}/sysdeps/unix/sysv/linux/x86/include provided by vscode, but, the includePath error doesn't go away.
Should I be more specific in adding routes?
can you tell me about this problem?