For my assignment I need to read some strings coming from a serial port. This has to be done in a kernel module, so I can't use stdio library. I'm trying in this way:
#include <linux/module.h>
#include <linux/unistd.h>
#include <asm/io.h>
#include <asm/fcntl.h>
#define SERIAL_PORT "/dev/ttyACM0"
void myfun(void){
int fd = open(SERIAL_PORT,O_RDONLY | O_NOCTTY);
..reading...
}
but it gives me "implicit declaration of function open"