diff --git a/part14-ethernet/Makefile.gcc b/part14-ethernet/Makefile.gcc index 3aa7670..674751a 100644 --- a/part14-ethernet/Makefile.gcc +++ b/part14-ethernet/Makefile.gcc @@ -1,7 +1,7 @@ CFILES = $(wildcard *.c lib/*.c kernel/*.c net/*.c) SFILES = $(wildcard boot/*.S lib/*.S kernel/*.S) OFILES = $(CFILES:.c=.o) $(SFILES:.S=.o) -GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles +GCCFLAGS = -Wall -O2 -ffreestanding -nostdlib -nostartfiles GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin all: clean kernel8.img diff --git a/part14-ethernet/lib/spi.c b/part14-ethernet/lib/spi.c index cf1cdf0..c6b0bd5 100644 --- a/part14-ethernet/lib/spi.c +++ b/part14-ethernet/lib/spi.c @@ -1,4 +1,5 @@ #include "../include/io.h" +#include "../include/fb.h" // SPI @@ -83,6 +84,7 @@ void spi_send_recv(unsigned char *sbuffer, unsigned char *rbuffer, unsigned int while(!(REGS_SPI0->cs & CS_DONE)) { while(REGS_SPI0->cs & CS_RXD) { unsigned int r = REGS_SPI0->fifo; + debughex(r); } } diff --git a/part14-ethernet/net/enc28j60.c b/part14-ethernet/net/enc28j60.c index 8570ea2..52ba6a5 100644 --- a/part14-ethernet/net/enc28j60.c +++ b/part14-ethernet/net/enc28j60.c @@ -191,7 +191,7 @@ static void calibrate(void) * Software delay in µs * us: the number of µs to wait **/ -__inline void up_udelay(uint32_t us) +static __inline void up_udelay(uint32_t us) { volatile uint32_t i; diff --git a/part14-ethernet/net/enc28j60.h b/part14-ethernet/net/enc28j60.h index eaab987..7c378c0 100644 --- a/part14-ethernet/net/enc28j60.h +++ b/part14-ethernet/net/enc28j60.h @@ -811,6 +811,6 @@ void ENC_GetPkcnt(ENC_HandleTypeDef *handle); * ****************************************************************************/ -__inline void up_udelay(uint32_t us); +//__inline void up_udelay(uint32_t us); #endif /* ENC28J60_H_INCLUDED */