serial_protocol remove constexpr
This commit is contained in:
parent
5eedad7ff3
commit
8ad3b7a11d
@ -41,7 +41,7 @@ static inline uint32_t le_bswap(const uint32_t n)
|
||||
return __builtin_bswap32(n);
|
||||
}
|
||||
|
||||
constexpr union command_reply command_reply(uint32_t cmd, uint32_t arg0, uint32_t arg1)
|
||||
union command_reply command_reply(uint32_t cmd, uint32_t arg0, uint32_t arg1)
|
||||
{
|
||||
union command_reply command = {
|
||||
.cmd = le_bswap(cmd),
|
||||
@ -67,27 +67,27 @@ namespace command {
|
||||
|
||||
static_assert(_maple_raw == 0xb62422e0);
|
||||
|
||||
constexpr union command_reply write(uint32_t dest, uint32_t size)
|
||||
union command_reply write(uint32_t dest, uint32_t size)
|
||||
{
|
||||
return command_reply(_write, dest, size);
|
||||
}
|
||||
|
||||
constexpr union command_reply read(uint32_t dest, uint32_t size)
|
||||
union command_reply read(uint32_t dest, uint32_t size)
|
||||
{
|
||||
return command_reply(_read, dest, size);
|
||||
}
|
||||
|
||||
constexpr union command_reply jump(uint32_t dest)
|
||||
union command_reply jump(uint32_t dest)
|
||||
{
|
||||
return command_reply(_jump, dest, 0);
|
||||
}
|
||||
|
||||
constexpr union command_reply speed(uint32_t speed)
|
||||
union command_reply speed(uint32_t speed)
|
||||
{
|
||||
return command_reply(_speed, speed, 0);
|
||||
}
|
||||
|
||||
constexpr union command_reply maple_raw(uint32_t send_size, uint32_t recv_size)
|
||||
union command_reply maple_raw(uint32_t send_size, uint32_t recv_size)
|
||||
{
|
||||
return command_reply(_maple_raw, send_size, recv_size);
|
||||
}
|
||||
@ -112,32 +112,32 @@ namespace reply {
|
||||
|
||||
static_assert(_crc == 0xcc9aab7c);
|
||||
|
||||
constexpr union command_reply write(uint32_t dest, uint32_t size)
|
||||
union command_reply write(uint32_t dest, uint32_t size)
|
||||
{
|
||||
return command_reply(_write, dest, size);
|
||||
}
|
||||
|
||||
constexpr union command_reply read(uint32_t dest, uint32_t size)
|
||||
union command_reply read(uint32_t dest, uint32_t size)
|
||||
{
|
||||
return command_reply(_read, dest, size);
|
||||
}
|
||||
|
||||
constexpr union command_reply jump(uint32_t dest)
|
||||
union command_reply jump(uint32_t dest)
|
||||
{
|
||||
return command_reply(_jump, dest, 0);
|
||||
}
|
||||
|
||||
constexpr union command_reply speed(uint32_t speed)
|
||||
union command_reply speed(uint32_t speed)
|
||||
{
|
||||
return command_reply(_speed, speed, 0);
|
||||
}
|
||||
|
||||
constexpr union command_reply crc(uint32_t crc)
|
||||
union command_reply crc(uint32_t crc)
|
||||
{
|
||||
return command_reply(_crc, crc, 0);
|
||||
}
|
||||
|
||||
constexpr union command_reply maple_raw(uint32_t send_size, uint32_t recv_size)
|
||||
union command_reply maple_raw(uint32_t send_size, uint32_t recv_size)
|
||||
{
|
||||
return command_reply(_maple_raw, send_size, recv_size);
|
||||
}
|
||||
|
@ -2,18 +2,19 @@ CFLAGS = -Og -g -gdwarf-4 -Wall -Wextra -Werror -Wfatal-errors -ggdb -fstack-pro
|
||||
CFLAGS += -Wno-error=unused-parameter
|
||||
CFLAGS += -Wno-error=unused-variable
|
||||
CFLAGS += -Wno-error=unused-but-set-variable
|
||||
CFLAGS += -Wno-vla-cxx-extension
|
||||
CXXFLAGS = -std=c++23
|
||||
|
||||
FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
|
||||
FREETYPE_LDFLAGS = $(shell pkg-config --libs freetype2)
|
||||
|
||||
FTDI_CFLAGS = $(shell pkg-config --cflags libftdi1) -I..
|
||||
FTDI_CFLAGS = $(shell pkg-config --cflags libftdi1) -I.
|
||||
FTDI_LDFLAGS = $(shell pkg-config --libs libftdi1)
|
||||
|
||||
all: ttf_outline
|
||||
|
||||
crc32.o: ../crc32.c
|
||||
$(CC) -std=gnu2x $(CFLAGS) -I.. -c $< -o $@
|
||||
crc32.o: crc32.c
|
||||
$(CC) -std=gnu2x $(CFLAGS) -I. -c $< -o $@
|
||||
|
||||
ttf_%.o: ttf_%.cpp
|
||||
$(CXX) $(CFLAGS) $(CXXFLAGS) $(FREETYPE_CFLAGS) -c $< -o $@
|
||||
|
Loading…
x
Reference in New Issue
Block a user