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

hil: ble_advertising: Pass the transmit buffer on callback #1917

Merged
merged 1 commit into from Jun 15, 2020

Conversation

alistair23
Copy link
Contributor

Pull Request Overview

Pass the BLE transmit buffer back to the capsule.

Testing Strategy

TODO or Help Wanted

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Copy link
Contributor

@bradjc bradjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more in line with our other drivers: buffers are passed down and back up, rather than cycling between two buffers.

@hudson-ayers
Copy link
Contributor

I tested this on the nrf52840dk with the libtock-c ble_advertising example and it works.

One downside of this is that if a transmission fails for some reason the buffer is lost forever, whereas the previous design could just call transmit_advertisement() again...but I agree that this is more in line with our other drivers

@bradjc bradjc added HIL This affects a Tock HIL interface. last-call Final review period for a pull request. labels Jun 12, 2020
@alistair23 alistair23 mentioned this pull request Jun 14, 2020
2 tasks
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit 671e151 into tock:master Jun 15, 2020
bors bot added a commit that referenced this pull request Jun 25, 2020
1934: Initial support for Apollo3 BLE r=bradjc a=alistair23

### Pull Request Overview

This PR adds initial support for the Apollo3 BLE module.

This PR can power up the module and write data to it and receive interrupts.

~~This PR applies on top of: #1917

### Testing Strategy

Try to run the `libtock-c` examples on the Apollo3.

### TODO or Help Wanted

Lots of things still aren't done, if anyone is willing to help I would be very grateful.

BLE still doesn't work (I can't see the device advertise itself from other devices).

This PR also doesn't apply the binaries (called patches) that are required to use the BLE module. I have a branch where I call the to HAL's C code to do this.

I currently just see the `ble_advertisment_driver` alarm firing and the same data being written to the BLE device over and over again. I'm not sure what else should be happening, but BLE is currently not working.

### Documentation Updated

- [X] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [X] Ran `make prepush`.


Co-authored-by: Alistair Francis <alistair@alistair23.me>
Co-authored-by: Brad Campbell <bradjc5@gmail.com>
@alistair23 alistair23 deleted the alistair/ble-buf branch June 25, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HIL This affects a Tock HIL interface. last-call Final review period for a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants