Commit graph

21 commits

Author SHA1 Message Date
iceman1001 a5594d5f3c style, receive_ng_internal, when receiving NG frames we have an extra buffer. Somehow it seems to the be cause of issues with long emrtd dumps 2024-03-03 22:02:38 +01:00
iceman1001 f8f135a3b7 style 2023-12-18 10:11:11 +01:00
iceman1001 fe4c5792fc make sure its initialised 2023-12-14 23:43:30 +01:00
iceman1001 79213b169a style 2023-12-14 00:37:06 +01:00
wh201906 3ee13c9ba6
Apply suggestions from @henrygab
Check if memory allocation fails
Fix memory leak
Initialize struct in declaration
Add/Fix some notes
Remove unlikely() in favor of readability
Remove a hard-coded magic number
2023-11-15 18:04:52 +08:00
wh201906 e1dc17df1a
Add async_usb_write_XX() 2023-11-14 01:12:21 +08:00
wh201906 a0af1fa085
Use ping-pong mode from the start of usb_write()
Before:
708608,708608,707584,707584,708608->708198.4 bytes/s
After:
722944,733184,732160,731136,733184->730521.6 bytes/s

Added some note for ping-pong mode and non ping-pong mode
2023-10-24 12:31:41 +08:00
wh201906 72da0c9623
Fix some wrong synchronization waits in usb_write()
To make the full use of the ping-pong endpoint
Transfer speed before this fix:
616448,618496,618496,615424,615424->616857.6 bytes/s
Transfer speed after this fix:
707584,709632,707584,709632,710656->709017.6 bytes/s (+14.9%)
Tested by running hw status
2023-10-24 00:46:28 +08:00
Henry Gabryjelski c531bd0f65 make style updates 2023-02-18 12:20:43 -08:00
Henry Gabryjelski 229454963b standardize flash uniqueID to big-endian 2023-02-18 12:16:50 -08:00
Henry Gabryjelski 48ca513a96 updates from make style 2023-02-17 17:27:07 -08:00
Henry Gabryjelski 44676bde72 Bootrom: Enable serial number from flash
* Add `.ramfunc` section to bootrom loader script
* exclude spiffs functionality from flashmem.h/flashmem.c
   (allows bootrom to use flashmem)
* hide unused tick.h / flashmem.h functions from bootrom
   (not technically necessary; see comments)
* bootrom: add source files, include path, and defines when
  `PLATFORM_DEFS` defines `WITH_FLASH`
* Define `AS_BOOTROM` to indicate code is building for bootrom
2023-02-17 17:07:13 -08:00
Henry Gabryjelski 5784c8de77 Update USB Serial Number from SPI flash's uniqueID
Also allow flash to be separately enabled via PLATFORM_EXTRAS.

NOTE: this does *NOT* enable the serial number
in the bootrom.  Still investigating options there.
2023-02-17 17:07:13 -08:00
Philippe Teuwen 30aa7aa7d1 Adapting license headers, WIP 2022-01-08 00:40:52 +01:00
Philippe Teuwen bc76c7263e reduce some globals scope 2021-08-21 23:14:54 +02:00
Philippe Teuwen cb8d589fc4 armsrc: clarify static vars vs global vars, part 3 2020-05-19 18:12:40 +02:00
Philippe Teuwen 8e4aba5e53 arm: fix prototypes 2020-05-11 13:48:57 +02:00
Philippe Teuwen f9463d183a bootloader: fix missing prototypes and shadowed vars 2020-05-11 13:48:57 +02:00
iceman1001 392da6400a chg: waiting for shiftregisters (@pwpiwi) 2020-03-31 09:44:36 +02:00
osboxes.org 6293749ffd style 2019-12-31 22:19:54 +01:00
Philippe Teuwen d19754567d summer restructuring:
* .h include only the strict minimum for their own parsing
  * this forces all files to include explicitment their needs and not count on far streched dependencies
  * this helps Makefile to rebuild only the minimum
  * according to this rule, most standalone .h are now gone
  * big app.h is gone
  * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway
* all unrequired include were removed
* split common/ into common/ (client+arm) and common_arm/ (os+bootloader)
  * bring zlib to common/
  * bring stuff not really/not yet used in common back to armsrc/ or client/
  * bring liblua into client/
  * bring uart into client/
  * move some portions of code around (dbprint, protocols,...)
* rename unused files into *_disabled.[ch] to make it explicit
* rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash
* remove PrintAndLogDevice
* move deprecated-hid-flasher from client to tools
* Makefiles
  * treat deps in armsrc/ as in client/
  * client: stop on warning (-Werror), same as for armsrc/

Tested on:

* all standalone modes
* Linux
2019-08-11 21:42:01 +02:00
Renamed from common/usb_cdc.c (Browse further)