mirror of
https://github.com/keirf/greaseweazle-firmware.git
synced 2025-10-31 11:06:44 -07:00
CMD_GET_INFO: New field 'usb_buf_kb'
This commit is contained in:
@@ -164,6 +164,7 @@ struct packed gw_info {
|
|||||||
uint8_t mcu_id;
|
uint8_t mcu_id;
|
||||||
uint16_t mcu_mhz;
|
uint16_t mcu_mhz;
|
||||||
uint16_t mcu_sram_kb;
|
uint16_t mcu_sram_kb;
|
||||||
|
uint16_t usb_buf_kb;
|
||||||
};
|
};
|
||||||
extern struct gw_info gw_info;
|
extern struct gw_info gw_info;
|
||||||
|
|
||||||
|
|||||||
@@ -565,6 +565,10 @@ void floppy_init(void)
|
|||||||
{
|
{
|
||||||
floppy_mcu_init();
|
floppy_mcu_init();
|
||||||
|
|
||||||
|
gw_info.fw_major = fw_major;
|
||||||
|
gw_info.fw_minor = fw_minor;
|
||||||
|
gw_info.usb_buf_kb = U_BUF_SZ >> 10;
|
||||||
|
|
||||||
/* Output pins, unbuffered. */
|
/* Output pins, unbuffered. */
|
||||||
configure_pin(dir, GPO_bus);
|
configure_pin(dir, GPO_bus);
|
||||||
configure_pin(step, GPO_bus);
|
configure_pin(step, GPO_bus);
|
||||||
@@ -1441,8 +1445,6 @@ static void process_command(void)
|
|||||||
memset(&u_buf[2], 0, 32);
|
memset(&u_buf[2], 0, 32);
|
||||||
switch(idx) {
|
switch(idx) {
|
||||||
case GETINFO_FIRMWARE: /* gw_info */
|
case GETINFO_FIRMWARE: /* gw_info */
|
||||||
gw_info.fw_major = fw_major;
|
|
||||||
gw_info.fw_minor = fw_minor;
|
|
||||||
memcpy(&u_buf[2], &gw_info, sizeof(gw_info));
|
memcpy(&u_buf[2], &gw_info, sizeof(gw_info));
|
||||||
break;
|
break;
|
||||||
case GETINFO_BW_STATS: /* gw_bw_stats */ {
|
case GETINFO_BW_STATS: /* gw_bw_stats */ {
|
||||||
|
|||||||
Reference in New Issue
Block a user