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

test_usart_c::receive always returns 0xAA #10

Closed
Lennart99 opened this issue Apr 18, 2019 · 2 comments
Closed

test_usart_c::receive always returns 0xAA #10

Lennart99 opened this issue Apr 18, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@Lennart99
Copy link

The receive function of the test_usart class always returns 0xAA.
I think this limits the use cases of this class, because it isn't really possible to test the processing of usart messages of a module. I think it would be more useful to be able to prepare a message in the bus and let the module receive that message thru the usart library, a bit like the mock-bus of the internal communication library.

It would than look a bit like this in the test code, this is of course just an example:

test_usart_c usart;  // initialize test usart
usart.prepare_message({0xAA, 0xFF, 0x67, some_more_bytes}); // add a message to the usart to be processed by the module

// run code to be tested
module_to_test_c module(usart);
module.proces_uart();
// check stuff

for sending you could do something simular of course.

@PatrickDekker98
Copy link
Contributor

Yes, this is correct, in a later version this will be added

@itzandroidtab itzandroidtab added the enhancement New feature or request label May 8, 2019
@itzandroidtab
Copy link
Contributor

This is implemented in the current PR #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants