Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HardwareSerial: Fix for zero availableCharsCount in callback if there… #1307

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

cspiel1
Copy link
Contributor

@cspiel1 cspiel1 commented Dec 30, 2017

… are more than 15 chars available.

In HardwareSerial::callbackHandler the encoding of last character, number of available characters and the uart nr is done like this:

void HardwareSerial::callbackHandler(uart_t *uart) {
...
uint32 serialQueueParameter;
uint16 cc = uart_rx_available(uart);
serialQueueParameter = (cc * 256) + receivedChar;
serialQueueParameter += (uart->uart_nr << 25);
...
}
The logic & for the decoding in HardwareSerial::delegateTask is done on 0x0FFF. But one F stands for 4 bit. So we need six F.

@slaff slaff added this to the 3.5.1 milestone Jan 12, 2018
@slaff slaff merged commit 41d5a2c into SmingHub:develop Jan 12, 2018
@slaff slaff removed the 3 - Review label Jan 12, 2018
@slaff slaff mentioned this pull request Feb 26, 2018
15 tasks
slaff pushed a commit to slaff/Sming that referenced this pull request Mar 5, 2018
…ree heap memory at your disposable and less bugs.

- [x] Unified the stream classes for better testability and reusability. (SmingHub#1332) The `length()` method in the DataSourceStream classes is deprecated and will be removed in the coming versions. Use `available()` instead.
- [x] MacOS compatibility issues. (SmingHub#1316)
- [x] Memory Optimization: Moved C++ vtables into IRAM, out of HEAP. In some cases increased the free heap with 3K. (SmingHub#1320)
- [x] Updated axTLS to its latest version and increased available free heap (SmingHub#1329).
- [x] Decreased the default debug messages in the network layer (SmingHub#1327) as part of our effort to provide better out-of-the-box experience (SmingHub#1328)
- [x] Reorganization: Moved the tools under tools/ folder and added esptool2 as submodule as part of the better experience.
- [x]  Fix: Added linker flags to allow the use of custom crash handlers in the user code. (SmingHub#1326)
- [x] Small fix to the FreeBSD make mechanism.
- [x] HardwareSerial: Fix for zero availableCharsCount in callback ... (SmingHub#1307)
- [x] Adds Cygwin32 build support (SmingHub#1306)
- [x] Modified libemqtt & MqttClient to allow the publishing of binary messages (SmingHub#1300)

All PRs scheduled for this release can be seen from [here](https://github.com/SmingHub/Sming/milestone/14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants