AlistairSymonds / SympleAstroFocus

A symple AF DIY way to control a stepper motor from a PC for astronomy
MIT License
11 stars 2 forks source link

Update USB protocol documentation. #4

Closed ozonejunkieau closed 2 years ago

ozonejunkieau commented 2 years ago

I've update the document to clarify a few points, and also removed the usage of dword (as it's actually a Microsoft specific type) and tried to clarify how the interface works. I've added some more details to the example based on my understanding of how it works and reformatted the tables to match a more standard format that would commonly be seen in register maps.

AlistairSymonds commented 2 years ago

For the unknown fields they basically come from this file: https://github.com/AlistairSymonds/SympleAstroFocus/blob/main/stm32/SympleAstroFocusStepper/SympleMotor/hw_defs.h

I've been manually editing the apprioate values in to do releases, just trying to avoid painting myself into a corner and not really used by anything - the idea is when its a dev releases the fiedls are junk and you know to ignore them but otherwise then fields are valid if its release. All speculation for future :D

As for DWORD well.... I used to think like you too but then I started working in HW and we've got dwords EVERYWHERE ctrl+f for dword in here, we're living at a level lower than MS but still got it stuck in! However I think that's more just my personal inertia and not representative of most people so a good change, similar with the USB endpoint naming - the direction of IN and OUT are defined to be host relative as part of the USB spec, so I'll merge it but am going to add a usb in and usb out in brackets or something.