Git Product home page Git Product logo

Comments (5)

jjmz avatar jjmz commented on July 4, 2024

SDCC 4.0.7 ...
Compiles with printf_small instead of printf (#define printf printf_small in usbhost.c and UsbHostHub_KM.c) - I have not checked if code was working on real hardware yet.

from ch554_sdcc.

prosper00 avatar prosper00 commented on July 4, 2024

Great! I'll try it on real chips as soon as they arrive. I bought a bunch to play with, and am excited to try them out

from ch554_sdcc.

jjmz avatar jjmz commented on July 4, 2024

Code compiles and 'works', but debug information on the Uart output is not the expected one...

Start @chipid=T2X (should be : printf( "Start @chipid=%02X\n", (uint16_t)CHIP_ID ); )
Wait Device In
Query Mouse @␀4X
Query Mouse @␀4X

I think it would be better to remove all printf and replace by some custom putstring/printhex to reduce footprint.

from ch554_sdcc.

jjmz avatar jjmz commented on July 4, 2024

I have made some tests on my github repository : the ch554_sdcc debug code as library (the linker will not include getchar for example), and 4 functions to print str/hex2/hex4/linefeed (also as library). Not very clean regarding the Makefile. It fits with full debug in usbhost and Usb_Host_KM.
Result looks like this on TX pin P3.1 (9600bps)

Start @ChipID=54
Wait Device In
USB dev in
EnumUSBDev
Reset USB Port
GetDevDescr: x12 x01 x00 x02 x00 x00 x00 x08 x6D x04 x77 xC0 x00 x72 x01 x02 x00 x01 
GetCfgDescr: x09 x02 x22 x00 x01 x01 x00 xA0 x32 x09 x04 x00 x00 x01 x03 x01 x02 x00 x09 x21 x11 x01 x00 x01 x22 x2E x00 x07 x05 x81 x03 x04 x00 x0A 
01 
AnalyzeHidIntEndp 01
CtrlSetUsbConfig 01
GetHIDReport: x05 x01 x09 x02 xA1 x01 x09 x01 xA1 x00 x05 x09 x19 x01 x29 x03 x15 x00 x25 x01 x95 x08 x75 x01 x81 x02 x05 x01 x09 x30 x09 x31 x09 x38 x15 x81 x25 x7F x75 x08 x95 x03 x81 x06 xC0 xC0 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 x00 
USB-Mouse Ready
Query Mouse @0000
Query Mouse @0000

from ch554_sdcc.

prosper00 avatar prosper00 commented on July 4, 2024

I got my 554's in the mail today! Can confirm that these tweaks work.

Thank you! I'm totally going to poach your library too :)

from ch554_sdcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.