Last active
October 30, 2023 11:36
-
-
Save jacobly0/4595cb00f9b8cefeef5e2c01b090db2b to your computer and use it in GitHub Desktop.
unnamed structs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/srldrvce/srldrvce.asm b/src/srldrvce/srldrvce.asm | |
index 48c9dd13..c81577cd 100644 | |
--- a/src/srldrvce/srldrvce.asm | |
+++ b/src/srldrvce/srldrvce.asm | |
@@ -36,6 +36,15 @@ end macro | |
; memory structures | |
;------------------------------------------------------------------------------- | |
macro struct? name*, parameters& | |
+ local anon | |
+ anon = 0 | |
+ macro name args& | |
+ anon = anon + 1 | |
+ repeat 1, @anon: anon | |
+ .@anon name args | |
+ end repeat | |
+ end macro | |
+ | |
macro end?.struct?! | |
iterate base, ., .base | |
if defined base | |
@@ -46,7 +55,7 @@ macro struct? name*, parameters& | |
end struc | |
iterate <base,prefix>, 0,, ix-name,x, iy-name,y | |
virtual at base | |
- prefix#name name | |
+ ?prefix#name name | |
end virtual | |
end iterate | |
purge end?.struct? | |
@@ -145,7 +154,7 @@ struct descriptor | |
end struct | |
struct deviceDescriptor | |
label .: 18 | |
- descriptor descriptor | |
+ ?descriptor descriptor | |
bcdUSB rw 1 | |
bDeviceClass rb 1 | |
bDeviceSubClass rb 1 | |
@@ -161,7 +170,7 @@ struct deviceDescriptor | |
end struct | |
struct configurationDescriptor | |
label .: 9 | |
- descriptor descriptor | |
+ ?descriptor descriptor | |
wTotalLength rw 1 | |
bNumInterfaces rb 1 | |
bConfigurationValue rb 1 | |
@@ -171,7 +180,7 @@ struct configurationDescriptor | |
end struct | |
struct interfaceDescriptor | |
label .: 9 | |
- descriptor descriptor | |
+ ?descriptor descriptor | |
bInterfaceNumber rb 1 | |
bAlternateSetting rb 1 | |
bNumEndpoints rb 1 | |
@@ -182,7 +191,7 @@ struct interfaceDescriptor | |
end struct | |
struct endpointDescriptor | |
label .: 7 | |
- descriptor descriptor | |
+ ?descriptor descriptor | |
bEndpointAddress rb 1 | |
bmAttributes rb 1 | |
wMaxPacketSize rw 1 | |
@@ -854,6 +863,12 @@ set_rate_cdc: | |
.linecoding: | |
db $80,$25,0,0,0,0,8 | |
+mysp setuppkt $21,$20,$0000,$0000,$0007 | |
+ setuppkt $21,$20,$0000,$0000,$0007 | |
+ setuppkt $21,$20,$0000,$0000,$0007 | |
+ setuppkt $21,$20,$0000,$0000,$0007 | |
+ setuppkt $21,$20,$0000,$0000,$0007 | |
+ setuppkt $21,$20,$0000,$0000,$0007 | |
; Sets the baud rate of a FTDI device | |
; Inputs: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment