-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Alter onewire libs so other non-ibutton pins can be used as well #1635
Alter onewire libs so other non-ibutton pins can be used as well #1635
Conversation
87f8a71
to
779f3c1
Compare
* Sets the pin to interrupt mode (EXTI interrupt on rise or fall), and sets it to float | ||
* @param gpio | ||
*/ | ||
void furi_hal_onewire_start_interrupt(const GpioPin* gpio); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment which EXTI (which pin) can be used as an interrupt.
V9 table from https://docs.google.com/spreadsheets/d/1qAPFTwvMwbTp1hTAtZHlO6jpl9o-fXg49rPIQ1o7JiQ/edit?usp=sharing
(0, 1, 4, 5, 7, 8, 14).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to add this, but I'm not sure what you mean. I'm not that initimate with electronics.
Are you saying all pins on A..H are interrupt-capable if they're on EXTI{0,1,4,5,7,8,14} and all others are not?
I.e.:
/*
* Sets the pin to interrupt mode (EXTI interrupt on rise or fall), and sets it to float
* The following pins are valid:
* gpio_infrared_rx, gpio_display_rst_n, gpio_ext_pc0, gpio_subghz_cs (EXTI0),
* gpio_cc1101_g0, gpio_display_di, gpio_ext_pc1, gpio_spi_d_sck (EXTI1),
* ... etc ...
?
I have no idea what I'm typing here, so I could be off by a mile 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @DrZlo13 : any hint is appreciated :)
64ab40c
to
bd1ab81
Compare
Changes so onewire_host_alloc() now takes a mandatory GpioPin. For iButton, this would be &ibutton_gpio. For other uses, the &gpio_ext_pa7 (and other pins) can be used. This changeset allows us to implement plugins/apps that speak the OneWire protocol over the top gpio pins. Closes: flipperdevices#1596
Replace the calls with the new furi_hal_onewire_xx equivalents Change request by @DrZlo13.
bd1ab81
to
e9a93c9
Compare
Please feel free to reopen after fixing all requested changes. |
Not fair @skotopes . I've asked for clarification, but not gotten any. |
Looks like you added DS18B20 support in 7a3a1aa as well 👌 |
What's new
Changes so
onewire_host_alloc()
now takes a mandatory GpioPin. For iButton, this would be&ibutton_gpio
. For other uses, the&gpio_ext_pa7
(and other pins) can be used.This changeset allows us to implement plugins/apps that speak the OneWire protocol over the top gpio pins.
Closes: #1596
Verification
Checklist (For Reviewer)