PinguinoIDE / pinguino-libraries

Pinguino librairies, keywords and other useful files.
24 stars 27 forks source link

Fix 16F1459 usbcdc.c compile error #21

Closed kh90909 closed 6 years ago

kh90909 commented 6 years ago

The 16F1459 only has eight endpoints, so SFRs UEP8-15 do not exist. This commit conditionally removes the code initializing those SFRs to avoid the compile error.

kh90909 commented 6 years ago

With this change, the code compiles, and programs with CDC.write() and CDC.read() work correctly. However, the CDC printf simple example (04.Communication/USB/CDC/Printf_Simple.pde) still does not work. It compiles and uploads successfully, but after about 1 second, it returns to the bootloader.

rblanchot commented 6 years ago

Thanks a lot.