Commit Graph

3124 Commits

Author SHA1 Message Date
chemicstry
c19667f05e Update stm32-data 2022-07-11 04:00:03 +03:00
chemicstry
734c38eb9c Add F4 flash driver 2022-07-11 03:57:46 +03:00
bors[bot]
9753f76794
Merge #810
810: Takes care of power for nRF USB devices r=Dirbaio a=huntc

Modifies the usb-serial example to illustrate how to setup USB for situations where the USB power can be detected and removed.

Gaps:

~~* No support for the nrf-softdevices as yet, although this should be possible via another constructor.~~
* No support for the nrf5340, although this should be possible via USBREG.

The change is tested and appears to work. Some notes:

* There's an existing field named self_powered as a UsbDevice field. It doesn't ever appear to get set. I'm wondering if this field is intended to signal that a device has the nRF VBUS power situation or not. I'm not presently using it.
* The new PowerDetected event is generated on the bus initially in situations where just new is used i.e. without power management, including on STM. We can therefore rely on this event always being generated.

Old description:

~~EnabledUsbDevice is a wrapper around the `UsbDevice` where its enablement is also subject to external events, such as `POWER` events for nRF. It is introduced generically to support other platforms should they also require external signaling for enablement.~~

Co-authored-by: huntc <huntchr@gmail.com>
2022-07-11 00:01:41 +00:00
Dario Nieuwenhuis
163cf1f335
Merge pull request #857 from chemicstry/windows_ci
Fix ci for windows (msys, git bash)
2022-07-11 01:47:59 +02:00
chemicstry
5bd2324275 Fix ci for windows (msys, git bash) 2022-07-11 02:32:30 +03:00
bors[bot]
c6a11db39e
Merge #854
854: Implement IWDG timeout calculation r=Dirbaio a=chemicstry

Allow specifying `IndependentWatchdog` timeout as `Duration` instead of prescaler value.

Since IWDG is clocked from LSI, which differs between families, I standardized HSI/LSI definitions in RCC and used that.

Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-07-10 21:45:34 +00:00
chemicstry
5a208d28d0 Fix g0 rcc build 2022-07-11 00:37:00 +03:00
bors[bot]
93e7d53e39
Merge #851
851: Gpio dynamic flex r=Dirbaio a=AntoineMugnier

Add Flex GPIO type for embassy-stm32 as it is the case for  embassy-nrf.


Co-authored-by: amugniere@gmail.com <antoine.mugnier@depixus.com>
2022-07-10 21:22:46 +00:00
chemicstry
5044361ddd Bump stm32-data 2022-07-11 00:17:15 +03:00
chemicstry
d7d1e46a5f Use u32 instead of Duration for IWDG 2022-07-11 00:00:33 +03:00
amugniere@gmail.com
323b0d1a5c Have removed ANOTHER redondant ErrorType trait impl 2022-07-10 22:01:48 +02:00
amugniere@gmail.com
1eca026ebd Have removed redondant ErrorType trait impl 2022-07-10 21:36:04 +02:00
amugniere@gmail.com
e4a36e1d98 rustfmt on previously edited files 2022-07-10 21:08:12 +02:00
amugniere@gmail.com
53388d4576 have adapted access to pin() and port() methods of Sealed::Pin in exti.rs according to previous changes on Input struct 2022-07-10 20:55:04 +02:00
chemicstry
3bf1e1d4aa Fix f2, wl compilation 2022-07-10 21:46:14 +03:00
chemicstry
f43545f36e Fix warnings 2022-07-10 21:16:54 +03:00
chemicstry
85054a7233 Fix typo 2022-07-10 21:15:38 +03:00
chemicstry
bd741a4019 Add comments to watchdog example 2022-07-10 21:08:30 +03:00
chemicstry
1fd5022e72 Refactor IWDG to use LSI frequency from RCC 2022-07-10 20:59:36 +03:00
chemicstry
bd01e90bfa Implement IWDG timeout calculation 2022-07-10 20:38:30 +03:00
bors[bot]
5f43c1d37e
Merge #850
850: Shared buses with SetConfig r=Dirbaio a=kalkyl

Addresses issue #830 

Co-authored-by: Henrik Alsér <henrik@mindbite.se>
2022-07-10 00:03:44 +00:00
Henrik Alsér
c9b5856153 Features only on nightly 2022-07-10 00:58:05 +02:00
Henrik Alsér
c9ceec8797 Cleanup 2022-07-10 00:49:46 +02:00
Henrik Alsér
ce7bc32755 Nightly feature gate for embedded-storage-async 2022-07-10 00:15:20 +02:00
Henrik Alsér
ef24faf2df Add asynch mod to shared_bus 2022-07-10 00:05:57 +02:00
Henrik Alsér
20f56b856f Add embassy-embedded-hal nightly feature 2022-07-09 23:44:08 +02:00
Henrik Alsér
baae64d911 Add embassy-embedded-hal nightly feature 2022-07-09 23:41:02 +02:00
amugniere@gmail.com
fa3e1ab68a correction of the access to flex pin attribute in gpio_v2 2022-07-09 14:06:47 +02:00
huntc
8785fbc6f1 Trait for UsbSupply
Eliminated a signal by using a simpler trait method that returns whether VBus power is available. Also includes a UsbSupply that can be signalled for use with the nRF softdevice. Includes the requirement for waiting for power to become available.
2022-07-09 17:57:31 +10:00
Dario Nieuwenhuis
921bc4d97b
Merge pull request #852 from embassy-rs/rp-flex
rp: add Flex gpio
2022-07-09 02:42:38 +02:00
Henrik Alsér
880b71a1e8 impl SetConfig for stm32 i2c and SPI 2022-07-09 02:28:05 +02:00
Dario Nieuwenhuis
ccf57cfab6 rp: add GPIO HIL test. 2022-07-09 02:14:30 +02:00
Dario Nieuwenhuis
5cc5961c94 rp/gpio: add Flex. 2022-07-09 02:14:30 +02:00
Henrik Alsér
85e67d94ad impl SetConfig for rp2040 SPI 2022-07-09 00:32:55 +02:00
Henrik Alsér
d637510b44 Associated type 2022-07-09 00:00:55 +02:00
Henrik Alsér
15384d27bb Merge upstream 2022-07-08 23:42:19 +02:00
Henrik Alsér
b72ba0a6c4 Merge upstream 2022-07-08 23:37:35 +02:00
amugniere@gmail.com
94c13eb2af forgotten file 2022-07-08 22:34:17 +02:00
amugniere@gmail.com
abba86d1ba Have added doc + minor correction 2022-07-08 22:24:29 +02:00
amugniere@gmail.com
dda528808a Flex/ output open drain test done 2022-07-08 22:16:01 +02:00
amugniere@gmail.com
00df9b507c Flex/ input pull up test done 2022-07-08 22:10:52 +02:00
amugniere@gmail.com
1d91405d4d Flex/ input pull down test done 2022-07-08 22:08:14 +02:00
amugniere@gmail.com
555f18aa95 Flex/ input no pull test done 2022-07-08 22:02:49 +02:00
amugniere@gmail.com
f911ad25c3 Flex/ Test initial output test done 2022-07-08 21:59:09 +02:00
amugniere@gmail.com
39702d7624 set_as_input_output() and set_as_output() : Have added comments and made functions public 2022-07-08 21:46:16 +02:00
bors[bot]
d2a622b3d0
Merge #849
849: Add EH 1.0 impls for stm32 i2c r=Dirbaio a=kalkyl

Add missing stm32 impls for embedded-hal 1.0 i2c traits

Co-authored-by: Henrik Alsér <henrik@mindbite.se>
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-07-08 15:09:49 +00:00
Henrik Alsér
f30ff9cadc Shared buses with SetConfig 2022-07-08 15:47:47 +02:00
huntc
81796d29b4 New constructor to cater for the softdevice
Also, correctly sets the initial power management state when using power management
2022-07-08 16:22:25 +10:00
Henrik Alsér
43aec9083c Cleanup 2022-07-08 08:03:38 +02:00
Henrik Alsér
51dc9b8de0 Merge branch 'stm32-eh1' of github.com:kalkyl/embassy into stm32-eh1 2022-07-08 08:02:05 +02:00