Skip to content

Commit d08747d

Browse files
authored
Merge pull request #1319 from dhalbert/origin/arturo182_bleio_pr_1289
Resubmit PR #1289, "WIP: bleio rewrite" by @arturo182
2 parents 283e072 + 64d457d commit d08747d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+6032
-4299
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ before_script:
5050
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
5151

5252
# For nrf builds
53-
- (! var_search "${TRAVIS_SDK-}" nrf || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
53+
- (! var_search "${TRAVIS_SDK-}" nrf || sudo ports/nrf/bluetooth/download_ble_stack.sh)
5454

5555
# For huzzah builds
5656
- (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar -C .. -xavf xtensa-lx106-elf-standalone.tar.gz))

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"ports/esp8266/modules",
116116
"ports/minimal",
117117
"ports/nrf/device",
118-
"ports/nrf/drivers",
118+
"ports/nrf/bluetooth",
119119
"ports/nrf/modules",
120120
"ports/nrf/nrfx",
121121
"ports/nrf/peripherals",

locale/circuitpython.pot

Lines changed: 122 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-10-25 12:53+1100\n"
11+
"POT-Creation-Date: 2018-11-07 14:10-0500\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -696,143 +696,165 @@ msgstr ""
696696
msgid "AnalogOut functionality not supported"
697697
msgstr ""
698698

699-
#: ports/nrf/common-hal/busio/I2C.c:96
700-
msgid "All I2C peripherals are in use"
699+
#: ports/nrf/common-hal/bleio/Adapter.c:41
700+
#, c-format
701+
msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
701702
msgstr ""
702703

703-
#: ports/nrf/common-hal/busio/SPI.c:115
704-
msgid "All SPI peripherals are in use"
704+
#: ports/nrf/common-hal/bleio/Adapter.c:125
705+
#, c-format
706+
msgid "Failed to change softdevice state, error: 0x%08lX"
705707
msgstr ""
706708

707-
#: ports/nrf/common-hal/busio/UART.c:48
709+
#: ports/nrf/common-hal/bleio/Adapter.c:135
708710
#, c-format
709-
msgid "error = 0x%08lX"
711+
msgid "Failed to get softdevice state, error: 0x%08lX"
710712
msgstr ""
711713

712-
#: ports/nrf/common-hal/busio/UART.c:86
713-
msgid "Invalid buffer size"
714+
#: ports/nrf/common-hal/bleio/Adapter.c:155
715+
#, c-format
716+
msgid "Failed to get local address, error: 0x%08lX"
714717
msgstr ""
715718

716-
#: ports/nrf/common-hal/busio/UART.c:90
717-
msgid "Odd parity is not supported"
719+
#: ports/nrf/common-hal/bleio/Characteristic.c:52
720+
#, c-format
721+
msgid "Failed to write gatts value, status: 0x%08lX"
718722
msgstr ""
719723

720-
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
721-
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
722-
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
723-
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
724-
#: ports/nrf/common-hal/busio/UART.c:364
725-
msgid "busio.UART not available"
724+
#: ports/nrf/common-hal/bleio/Characteristic.c:76
725+
#, c-format
726+
msgid "Failed to notify attribute value, status: 0x%08lX"
726727
msgstr ""
727728

728-
#: ports/nrf/common-hal/microcontroller/Processor.c:49
729+
#: ports/nrf/common-hal/bleio/Characteristic.c:91
729730
#, c-format
730-
msgid "Can not get temperature. status: 0x%02x"
731+
msgid "Failed to read attribute value, status: 0x%08lX"
731732
msgstr ""
732733

733-
#: ports/nrf/common-hal/pulseio/PWMOut.c:161
734-
msgid "All PWM peripherals are in use"
734+
#: ports/nrf/common-hal/bleio/Characteristic.c:119
735+
#: ports/nrf/common-hal/bleio/Device.c:272
736+
#: ports/nrf/common-hal/bleio/Device.c:307
737+
#, c-format
738+
msgid "Failed to acquire mutex, status: 0x%08lX"
735739
msgstr ""
736740

737-
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
738-
msgid "Cannot apply GAP parameters."
741+
#: ports/nrf/common-hal/bleio/Characteristic.c:126
742+
#, c-format
743+
msgid "Failed to write attribute value, status: 0x%08lX"
739744
msgstr ""
740745

741-
#: ports/nrf/drivers/bluetooth/ble_drv.c:213
742-
msgid "Cannot set PPCP parameters."
746+
#: ports/nrf/common-hal/bleio/Characteristic.c:138
747+
#: ports/nrf/common-hal/bleio/Device.c:284
748+
#: ports/nrf/common-hal/bleio/Device.c:319
749+
#: ports/nrf/common-hal/bleio/Device.c:354
750+
#: ports/nrf/common-hal/bleio/Device.c:391
751+
#, c-format
752+
msgid "Failed to release mutex, status: 0x%08lX"
743753
msgstr ""
744754

745-
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
746-
msgid "Can not query for the device address."
755+
#: ports/nrf/common-hal/bleio/Device.c:81
756+
#: ports/nrf/common-hal/bleio/Device.c:114
757+
msgid "Can not fit data into the advertisment packet"
747758
msgstr ""
748759

749-
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
750-
msgid "Can not add Vendor Specific 128-bit UUID."
760+
#: ports/nrf/common-hal/bleio/Device.c:266
761+
#, c-format
762+
msgid "Failed to discover serivices, status: 0x%08lX"
751763
msgstr ""
752764

753-
#: ports/nrf/drivers/bluetooth/ble_drv.c:284
754-
#: ports/nrf/drivers/bluetooth/ble_drv.c:298
755-
msgid "Can not add Service."
765+
#: ports/nrf/common-hal/bleio/Device.c:403
766+
#: ports/nrf/common-hal/bleio/Scanner.c:76
767+
#, c-format
768+
msgid "Failed to continue scanning, status: 0x%0xlX"
756769
msgstr ""
757770

758-
#: ports/nrf/drivers/bluetooth/ble_drv.c:373
759-
msgid "Can not add Characteristic."
771+
#: ports/nrf/common-hal/bleio/Device.c:436
772+
#, c-format
773+
msgid "Failed to connect, status: 0x%08lX"
760774
msgstr ""
761775

762-
#: ports/nrf/drivers/bluetooth/ble_drv.c:400
763-
msgid "Can not apply device name in the stack."
776+
#: ports/nrf/common-hal/bleio/Device.c:513
777+
#, c-format
778+
msgid "Failed to add service, status: 0x%08lX"
764779
msgstr ""
765780

766-
#: ports/nrf/drivers/bluetooth/ble_drv.c:464
767-
#: ports/nrf/drivers/bluetooth/ble_drv.c:514
768-
msgid "Can not encode UUID, to check length."
781+
#: ports/nrf/common-hal/bleio/Device.c:531
782+
#, c-format
783+
msgid "Failed to start advertisment, status: 0x%08lX"
769784
msgstr ""
770785

771-
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
772-
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
773-
msgid "Can encode UUID into the advertisement packet."
786+
#: ports/nrf/common-hal/bleio/Device.c:549
787+
#, c-format
788+
msgid "Failed to stop advertisment, status: 0x%08lX"
774789
msgstr ""
775790

776-
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
777-
msgid "Can not fit data into the advertisement packet."
791+
#: ports/nrf/common-hal/bleio/Device.c:575
792+
#: ports/nrf/common-hal/bleio/Scanner.c:103
793+
#, c-format
794+
msgid "Failed to start scanning, status: 0x%0xlX"
778795
msgstr ""
779796

780-
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
781-
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
797+
#: ports/nrf/common-hal/bleio/Device.c:592
782798
#, c-format
783-
msgid "Can not apply advertisement data. status: 0x%02x"
799+
msgid "Failed to create mutex, status: 0x%0xlX"
784800
msgstr ""
785801

786-
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
802+
#: ports/nrf/common-hal/bleio/Service.c:83
787803
#, c-format
788-
msgid "Can not start advertisement. status: 0x%02x"
804+
msgid "Failed to add characteristic, status: 0x%08lX"
789805
msgstr ""
790806

791-
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
807+
#: ports/nrf/common-hal/bleio/UUID.c:97
792808
#, c-format
793-
msgid "Can not stop advertisement. status: 0x%02x"
809+
msgid "Failed to add Vendor Specific UUID, status: 0x%08lX"
794810
msgstr ""
795811

796-
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
797-
#: ports/nrf/drivers/bluetooth/ble_drv.c:726
798-
#, c-format
799-
msgid "Can not read attribute value. status: 0x%02x"
812+
#: ports/nrf/common-hal/bleio/UUID.c:102
813+
msgid "Invalid UUID string length"
800814
msgstr ""
801815

802-
#: ports/nrf/drivers/bluetooth/ble_drv.c:667
803-
#: ports/nrf/drivers/bluetooth/ble_drv.c:756
804-
#, c-format
805-
msgid "Can not write attribute value. status: 0x%02x"
816+
#: ports/nrf/common-hal/bleio/UUID.c:109
817+
#: shared-bindings/bleio/Characteristic.c:125
818+
#: shared-bindings/bleio/Service.c:105
819+
msgid "Invalid UUID parameter"
806820
msgstr ""
807821

808-
#: ports/nrf/drivers/bluetooth/ble_drv.c:691
809-
#, c-format
810-
msgid "Can not notify attribute value. status: 0x%02x"
822+
#: ports/nrf/common-hal/busio/I2C.c:96
823+
msgid "All I2C peripherals are in use"
811824
msgstr ""
812825

813-
#: ports/nrf/drivers/bluetooth/ble_drv.c:784
814-
#, c-format
815-
msgid "Can not start scanning. status: 0x%02x"
826+
#: ports/nrf/common-hal/busio/SPI.c:115
827+
msgid "All SPI peripherals are in use"
816828
msgstr ""
817829

818-
#: ports/nrf/drivers/bluetooth/ble_drv.c:829
830+
#: ports/nrf/common-hal/busio/UART.c:48
819831
#, c-format
820-
msgid "Can not connect. status: 0x%02x"
832+
msgid "error = 0x%08lX"
821833
msgstr ""
822834

823-
#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
824-
#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
825-
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
826-
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
827-
msgid "Invalid UUID parameter"
835+
#: ports/nrf/common-hal/busio/UART.c:86
836+
msgid "Invalid buffer size"
828837
msgstr ""
829838

830-
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
831-
msgid "Invalid Service type"
839+
#: ports/nrf/common-hal/busio/UART.c:90
840+
msgid "Odd parity is not supported"
832841
msgstr ""
833842

834-
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
835-
msgid "Invalid UUID string length"
843+
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
844+
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
845+
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
846+
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
847+
#: ports/nrf/common-hal/busio/UART.c:364
848+
msgid "busio.UART not available"
849+
msgstr ""
850+
851+
#: ports/nrf/common-hal/microcontroller/Processor.c:49
852+
#, c-format
853+
msgid "Can not get temperature. status: 0x%02x"
854+
msgstr ""
855+
856+
#: ports/nrf/common-hal/pulseio/PWMOut.c:161
857+
msgid "All PWM peripherals are in use"
836858
msgstr ""
837859

838860
#: ports/unix/modffi.c:138
@@ -2088,6 +2110,30 @@ msgstr ""
20882110
msgid "buffer slices must be of equal length"
20892111
msgstr ""
20902112

2113+
#: shared-bindings/bleio/Address.c:101
2114+
msgid "Wrong address length"
2115+
msgstr ""
2116+
2117+
#: shared-bindings/bleio/Address.c:107
2118+
msgid "Wrong number of bytes provided"
2119+
msgstr ""
2120+
2121+
#: shared-bindings/bleio/Device.c:210
2122+
msgid "Can't add services in Central mode"
2123+
msgstr ""
2124+
2125+
#: shared-bindings/bleio/Device.c:226
2126+
msgid "Can't connect in Peripheral mode"
2127+
msgstr ""
2128+
2129+
#: shared-bindings/bleio/Device.c:256
2130+
msgid "Can't change the name in Central mode"
2131+
msgstr ""
2132+
2133+
#: shared-bindings/bleio/Device.c:277 shared-bindings/bleio/Device.c:313
2134+
msgid "Can't advertise in Central mode"
2135+
msgstr ""
2136+
20912137
#: shared-bindings/busio/I2C.c:120
20922138
msgid "Function requires lock."
20932139
msgstr ""

0 commit comments

Comments
 (0)