Comments (4)
I read the post ,does it work with (int)(1U << 31U)
?
from tinyusb.
works fine. Also tested with
/**
* build with
* gcc -Wfatal-errors -Wall -Wextra -Wpedantic -std=c11
*/
#include <stdio.h>
#include <stdint.h>
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
#define BYTE_TO_BINARY(byte) \
((byte) & 0x80 ? '1' : '0'), \
((byte) & 0x40 ? '1' : '0'), \
((byte) & 0x20 ? '1' : '0'), \
((byte) & 0x10 ? '1' : '0'), \
((byte) & 0x08 ? '1' : '0'), \
((byte) & 0x04 ? '1' : '0'), \
((byte) & 0x02 ? '1' : '0'), \
((byte) & 0x01 ? '1' : '0')
typedef enum
{
A = (int)(1U << 31U),
} size_test;
int main(void)
{
printf(BYTE_TO_BINARY_PATTERN " " BYTE_TO_BINARY_PATTERN " " BYTE_TO_BINARY_PATTERN " " BYTE_TO_BINARY_PATTERN "\n",
BYTE_TO_BINARY(A >> 24), BYTE_TO_BINARY(A >> 16), BYTE_TO_BINARY(A >> 8), BYTE_TO_BINARY(A)
);
}
Do you need a PR or do the change yourself?
Anyway, thank you very much for all your work!
from tinyusb.
Please make a PR so I can approve it sooner.
from tinyusb.
maybe we should re-open this until we find a solution
from tinyusb.
Related Issues (20)
- Settings CFG_TUD_MEM_SECTION causes a section type conflict HOT 3
- webserver NCM mode can't work HOT 18
- USB Bus Reset when running the CDC_MSC example (only CDC is enabled) on STM32U585OIYxQ custom board HOT 6
- LPC55S28 error for High Speed (PORT 1) not working for specific HID examples HOT 2
- Is it possible to provide an `ncm_open`, `ncm_close` API interface to control the connection and disconnection of USB? HOT 2
- USB Host: No set address recovery interval HOT 3
- Can Add support portable stm32h7 in src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c HOT 1
- tuh_edpt_abort_xfer should call user callback
- Vendor support outdated? HOT 1
- Add hook to allow for external host class drivers HOT 2
- OHCI: MMIO coherency/sync issue
- tud_task() hangs when there are no more messages in the buffer due to the timeout_ms value is set to UINT32_MAX. It should be 0, right? HOT 4
- Renesas RZ/T Support
- Consider adding preprocessor switch to disable automatic rp2040 binary declarations
- tud_umount_cb not called on Raspberry Pi Pico W HOT 1
- It can't work on STM32G0B1CBT6 with FreeRTOS. Please help. HOT 2
- Thoughts about increasing CDC transfer speed.
- Stack overflow with the new NCM driver HOT 12
- USBTMC for the host
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyusb.