example: use uint8_t for all maple send_buf/recv_buf
This commit is contained in:
parent
d74804f2b3
commit
d2dc73ace2
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
all: $(patsubst %.cpp,%.elf,$(wildcard example/*.cpp))
|
all: $(patsubst %.cpp,%.bin,$(wildcard example/*.cpp))
|
||||||
|
|
||||||
include base.mk
|
include base.mk
|
||||||
include common.mk
|
include common.mk
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
static ft0::data_transfer::data_format data[4];
|
static ft0::data_transfer::data_format data[4];
|
||||||
|
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
static ft0::data_transfer::data_format data[4];
|
static ft0::data_transfer::data_format data[4];
|
||||||
|
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
|
|
||||||
static ft0::data_transfer::data_format data[4];
|
static ft0::data_transfer::data_format data[4];
|
||||||
|
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
static ft0::data_transfer::data_format data[4];
|
static ft0::data_transfer::data_format data[4];
|
||||||
|
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
@ -54,8 +54,8 @@ void do_get_condition()
|
|||||||
|
|
||||||
void do_lm_request(uint8_t port, uint8_t lm)
|
void do_lm_request(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
@ -112,8 +112,8 @@ void do_lm_requests(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_device_request()
|
void do_device_request()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ static uint8_t * framebuffer;
|
|||||||
|
|
||||||
void send_vmu_framebuffer(uint8_t port, uint8_t lm)
|
void send_vmu_framebuffer(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
using command_type = maple::block_write<uint8_t[0]>;
|
using command_type = maple::block_write<uint8_t[0]>;
|
||||||
using response_type = maple::device_reply;
|
using response_type = maple::device_reply;
|
||||||
@ -82,8 +82,8 @@ void send_vmu_framebuffer(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_lm_request(uint8_t port, uint8_t lm)
|
void do_lm_request(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
@ -145,8 +145,8 @@ void do_lm_requests(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_device_request()
|
void do_device_request()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ static ft9::data_transfer::data_format data;
|
|||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
using command_type = maple::get_condition;
|
using command_type = maple::get_condition;
|
||||||
using response_type = maple::data_transfer<ft9::data_transfer::data_format>;
|
using response_type = maple::data_transfer<ft9::data_transfer::data_format>;
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
#include "systembus.hpp"
|
#include "systembus.hpp"
|
||||||
|
|
||||||
struct storage_state {
|
struct storage_state {
|
||||||
uint32_t * send_buf;
|
uint8_t * send_buf;
|
||||||
uint32_t * recv_buf;
|
uint8_t * recv_buf;
|
||||||
uint32_t host_port_select;
|
uint32_t host_port_select;
|
||||||
uint32_t destination_ap;
|
uint32_t destination_ap;
|
||||||
struct {
|
struct {
|
||||||
@ -289,8 +289,8 @@ bool allocate_file_information_data(storage_state& state,
|
|||||||
|
|
||||||
void do_lm_request(uint8_t port, uint8_t lm)
|
void do_lm_request(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
const uint32_t host_port_select = host_instruction_port_select(port);
|
const uint32_t host_port_select = host_instruction_port_select(port);
|
||||||
const uint32_t destination_ap = ap_port_select(port) | ap::de::expansion_device | lm;
|
const uint32_t destination_ap = ap_port_select(port) | ap::de::expansion_device | lm;
|
||||||
@ -547,8 +547,8 @@ void do_lm_requests(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_device_request()
|
void do_device_request()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include "maple/maple_bus_ft8.hpp"
|
#include "maple/maple_bus_ft8.hpp"
|
||||||
#include "sh7091/serial.hpp"
|
#include "sh7091/serial.hpp"
|
||||||
|
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
void do_lm_request(uint8_t port, uint8_t lm)
|
void do_lm_request(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
|
@ -48,8 +48,8 @@ inline void copy(T * dst, const T * src, const int32_t n) noexcept
|
|||||||
|
|
||||||
void send_wink(uint8_t port, uint8_t lm)
|
void send_wink(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
using command_type = maple::block_write<uint8_t[0]>;
|
using command_type = maple::block_write<uint8_t[0]>;
|
||||||
using response_type = maple::device_reply;
|
using response_type = maple::device_reply;
|
||||||
@ -86,8 +86,8 @@ void send_wink(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_lm_request(uint8_t port, uint8_t lm)
|
void do_lm_request(uint8_t port, uint8_t lm)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
@ -149,8 +149,8 @@ void do_lm_requests(uint8_t port, uint8_t lm)
|
|||||||
|
|
||||||
void do_device_request()
|
void do_device_request()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ static ft0::data_transfer::data_format data[4];
|
|||||||
|
|
||||||
void do_get_condition()
|
void do_get_condition()
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -246,8 +246,8 @@ void do_get_condition(uint32_t * command_buf,
|
|||||||
uint32_t * receive_buf,
|
uint32_t * receive_buf,
|
||||||
button_state& buttons)
|
button_state& buttons)
|
||||||
{
|
{
|
||||||
uint32_t send_buf[1024] __attribute__((aligned(32)));
|
uint8_t send_buf[1024] __attribute__((aligned(32)));
|
||||||
uint32_t recv_buf[1024] __attribute__((aligned(32)));
|
uint8_t recv_buf[1024] __attribute__((aligned(32)));
|
||||||
|
|
||||||
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
auto writer = maple::host_command_writer(send_buf, recv_buf);
|
||||||
|
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <cstdint>
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_start __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_start");
|
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_start __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_start");
|
||||||
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_end __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_end");
|
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_end __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_end");
|
||||||
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_size __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_size");
|
extern uint32_t _binary_font_dejavusansmono_dejavusansmono_mono_data_size __asm("_binary_font_dejavusansmono_dejavusansmono_mono_data_size");
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "serial_load.hpp"
|
#include "serial_load.hpp"
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
|
#include "memory.hpp"
|
||||||
|
|
||||||
#include "align.hpp"
|
#include "align.hpp"
|
||||||
#include "memory.hpp"
|
#include "memory.hpp"
|
||||||
|
@ -68,16 +68,16 @@ eeprom_type=6 # Integer: Chip Type / EEPROM Type. Corresponds to ftdi_
|
|||||||
# Strings to be used in this config file are:
|
# Strings to be used in this config file are:
|
||||||
# "TRISTATE", "TXLED", "RXLED", "TXRXLED", "PWREN", "SLEEP", "DRIVE_0", "DRIVE1", "IOMODE", "TXDEN", "CLK30", "CLK15", "CLK7_5"
|
# "TRISTATE", "TXLED", "RXLED", "TXRXLED", "PWREN", "SLEEP", "DRIVE_0", "DRIVE1", "IOMODE", "TXDEN", "CLK30", "CLK15", "CLK7_5"
|
||||||
##Type_232H Chips
|
##Type_232H Chips
|
||||||
cbush0=TRISTATE # String parsed to integer:
|
cbush0=RXLED # String parsed to integer:
|
||||||
cbush1=TRISTATE # String parsed to integer:
|
cbush1=TXLED # String parsed to integer:
|
||||||
cbush2=TRISTATE # String parsed to integer:
|
cbush2=TRISTATE # String parsed to integer:
|
||||||
cbush3=TRISTATE # String parsed to integer:
|
cbush3=TRISTATE # String parsed to integer:
|
||||||
cbush4=TRISTATE # String parsed to integer:
|
cbush4=TRISTATE # String parsed to integer:
|
||||||
cbush5=TRISTATE # String parsed to integer:
|
cbush5=IOMODE # String parsed to integer:
|
||||||
cbush6=TRISTATE # String parsed to integer:
|
cbush6=IOMODE # String parsed to integer:
|
||||||
cbush7=TRISTATE # String parsed to integer:
|
cbush7=TRISTATE # String parsed to integer:
|
||||||
cbush8=TXLED # String parsed to integer:
|
cbush8=IOMODE # String parsed to integer:
|
||||||
cbush9=RXLED # String parsed to integer:
|
cbush9=IOMODE # String parsed to integer:
|
||||||
# Group Drive
|
# Group Drive
|
||||||
# Strings to be used in this config file are:
|
# Strings to be used in this config file are:
|
||||||
# "4MA", "8MA", "12MA", "16MA"
|
# "4MA", "8MA", "12MA", "16MA"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user