mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-25 03:30:39 +00:00
part8 working with optimisation, but not with DEBUG=0 in fb.c
This commit is contained in:
parent
fa83c4ff5e
commit
7e3238758a
4 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
LLVMPATH = /opt/homebrew/opt/llvm/bin
|
LLVMPATH = /opt/homebrew/opt/llvm/bin
|
||||||
GCCFLAGS = -Wall -O0 -ffreestanding -nostdinc -nostdlib -mcpu=cortex-a72+nosimd
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -mcpu=cortex-a72+nosimd
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O0 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ..\..\gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-elf\bin
|
GCCPATH = ..\..\gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-elf\bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
unsigned char *params = (unsigned char *)SAFE_ADDRESS;
|
volatile unsigned char *params = (unsigned char *)SAFE_ADDRESS;
|
||||||
|
|
||||||
// UART0
|
// UART0
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ enum {
|
||||||
|
|
||||||
unsigned char empty[] = {};
|
unsigned char empty[] = {};
|
||||||
|
|
||||||
int hciCommandBytes(unsigned char *opcodebytes, unsigned char *data, unsigned char length)
|
int hciCommandBytes(volatile unsigned char *opcodebytes, volatile unsigned char *data, unsigned char length)
|
||||||
{
|
{
|
||||||
unsigned char c=0;
|
unsigned char c=0;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ int hciCommandBytes(unsigned char *opcodebytes, unsigned char *data, unsigned ch
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hciCommand(unsigned short ogf, unsigned short ocf, unsigned char *data, unsigned char length)
|
int hciCommand(unsigned short ogf, unsigned short ocf, volatile unsigned char *data, unsigned char length)
|
||||||
{
|
{
|
||||||
unsigned short opcode = ogf << 10 | ocf;
|
unsigned short opcode = ogf << 10 | ocf;
|
||||||
unsigned char opcodebytes[2] = { lo(opcode), hi(opcode) };
|
unsigned char opcodebytes[2] = { lo(opcode), hi(opcode) };
|
||||||
|
@ -233,6 +233,7 @@ void sendACLsubscribe(unsigned int handle)
|
||||||
params[4] = 0x00;
|
params[4] = 0x00;
|
||||||
|
|
||||||
unsigned int c=0;
|
unsigned int c=0;
|
||||||
|
|
||||||
while (c++<data_length) bt_writeByte(params[c-1]);
|
while (c++<data_length) bt_writeByte(params[c-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@ void breakout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//wait_msec(0x186A);
|
wait_msec(0x186A);
|
||||||
moveObjectAbs(ball, ball->x + velocity_x, ball->y + velocity_y);
|
moveObjectAbs(ball, ball->x + velocity_x, ball->y + velocity_y);
|
||||||
|
|
||||||
// Check we're in the game arena still
|
// Check we're in the game arena still
|
||||||
|
|
Loading…
Reference in a new issue