Commit Graph

201 Commits

Author SHA1 Message Date
Glenn Ruben Bakke
d3509517f5 nrf5/modules/music: Adding config guard in musictunes.c and adding import of mphal.h. 2017-05-08 22:05:23 +02:00
Glenn Ruben Bakke
a84ed760b5 nrf5/modules/music: Including mphal.h before config guard in modmusic.c. Also changed name on config guard to MICROPY_PY_MUSIC. Missing PWM functions during linkage will show up if PWM module has not not configured. 2017-05-08 22:03:33 +02:00
Glenn Ruben Bakke
c3ccef800d nrf5/modules/music: Backing up progress in music module. 2017-05-08 21:22:53 +02:00
Glenn Ruben Bakke
10cbc83cf0 nrf5/pwm: Updating config name of PWM to hardware PWM to prepare for introduction of soft variant. 2017-05-08 21:10:18 +02:00
Glenn Ruben Bakke
311ae77dc0 nrf5/modules/music: Backing up progress in modmusic. 2017-05-04 00:18:05 +02:00
Glenn Ruben Bakke
a7f10336e1 nrf5/modules/music: backing up porting progress in modmusic.c. 2017-05-02 22:40:31 +02:00
Glenn Ruben Bakke
d170ca5d03 nrf5/modules/music: Commenting out backend function calls in modmusic.c to make module compile for now. 2017-05-02 21:50:54 +02:00
Glenn Ruben Bakke
57442c2b25 nrf5/modules/music: Updating music module to use pin_obj_t instad of microbit_pin_obj_t. Update include to drivers/pwm.h to resolve some undefined functions. 2017-05-02 01:09:59 +02:00
Glenn Ruben Bakke
10e6b4309b nrf5/modules/music: Removing c++ extern definition. Updating include list in modmusic.c. Removing module name from module struct. 2017-05-01 19:55:43 +02:00
Glenn Ruben Bakke
01441c8f59 nrf5/modules/music: Removing include of modmicrobit.h in musictunes.c. 2017-05-01 19:52:40 +02:00
Glenn Ruben Bakke
e766c7ebbe nrf5/modules/music: Adding header to expose extern structs defined in musictunes.c 2017-05-01 19:51:47 +02:00
Glenn Ruben Bakke
eedd9eabe9 nrf5/modules/music: Renaming microbitmusic files to modmusic/music. 2017-05-01 19:11:44 +02:00
Glenn Ruben Bakke
20bdb7dc90 nrf5/modules/music: Renaming microbit module to music. 2017-05-01 19:08:36 +02:00
Glenn Ruben Bakke
f9b9d59434 nrf5/modules/microbit: Copying microbit music module to the port. 2017-05-01 19:06:49 +02:00
Glenn Ruben Bakke
1c756af9a4 nrf5/modules/timer: Adding timer3 and timer4 to timer object in case of nrf52 target. 2017-04-30 20:18:46 +02:00
Glenn Ruben Bakke
a0638880b3 nrf5/modules/timer: Optimizing timer object structure and updating the module to use new hal_timer_init structures and parameters. 2017-04-30 20:15:03 +02:00
Glenn Ruben Bakke
7449f8d861 nrf5/hal/timer: Changing hardcoded hal timer instance base to a lookup, so that IRQ num can be detected automatically without the need of using struct param on it. Size of binary does not increase when using Os. 2017-04-30 19:42:19 +02:00
Glenn Ruben Bakke
071e551b79 nrf5/modules/machine: Updating PWM module with two new kwargs parameters. One for setting pulse with more fine grained. This value should not exceed the period value. Also, adding support for setting PWM mode, whether it is LOW duty cycle or HIGH duty cycle. By default, high to low is set (this could be changed). 2017-04-18 21:00:52 +02:00
Glenn Ruben Bakke
1e79bdf0b4 nrf5/modules/machine: Updating Pin module to register a IRQ callback upon GPIO polarity change events. 2017-04-11 13:58:58 +02:00
Glenn Ruben Bakke
c7c2285ab9 nrf5/modules/machine: Style fix in pin object, indention. 2017-04-09 23:19:26 +02:00
Glenn Ruben Bakke
320b9ecde7 nrf5/modules/machine: Adding placeholder for irq method to pin object class. 2017-04-09 23:18:00 +02:00
Glenn Ruben Bakke
2c90d94dc7 nrf5/modules/machine: Adding pin irq type and basic functions and structures. 2017-04-09 23:16:07 +02:00
Glenn Ruben Bakke
6446105689 nrf5/modules/machine: Removing toggle event trigger as that will be a combination of the rising and falling together. 2017-04-09 21:52:57 +02:00
Glenn Ruben Bakke
32083a9443 nrf5/modules/machine: Adding new constants to pin object for polarity change triggers using the enumerated values in hal_gpio.h. 2017-04-09 21:50:11 +02:00
Glenn Ruben Bakke
d7cfae3639 nrf5/usocket: Removing network modules related to Bluetooth 6lowpan implementation as it depends on SDK libraries for now. Will be moved to seperate working branch. 2017-04-09 18:53:58 +02:00
Glenn Ruben Bakke
4dd86178bc nrf5: Removing custom display, framebuffer and graphics module to make branch contain core components instead of playground modules. 2017-04-09 18:25:15 +02:00
Glenn Ruben Bakke
a026d3475f nrf5/modules/usocket: Updating import of netutils.h after upmerge with upstream master. 2017-04-09 17:48:48 +02:00
Glenn Ruben Bakke
587c6277c4 nrf5/modules/ubluepy: Adding method Peripheral object to stop any ongoing advertisment. Adding compile guard to only include advertise and advertise_stop if peripheral role is compiled in. 2017-04-04 21:25:28 +02:00
Glenn Ruben Bakke
46c21ff6ba nrf5/modules/ubluepy: Adding support for starting advertisment from BLE UART REPL, by delaying registration of gatt/gatts and gattc handlers until needed in advertise or connect. If non connectable advertisment is selected, handlers in peripheral new is not anymore overriding the other peripheral instances which has set the callbacks. 2017-04-04 20:24:43 +02:00
Glenn Ruben Bakke
0559be4ffc nrf5/bluetooth: Adding possibility to configure whether advertisment should be connectable or not. 2017-04-02 18:34:56 +02:00
Glenn Ruben Bakke
f7fbf55a45 nrf5/modules/ubluepy: Open up Peripheral advertise method to pass custom data to the bluetooth driver. Allowing method to allow kwargs only if no args is set. To support setting data kwarg only. 2017-04-02 15:50:07 +02:00
Glenn Ruben Bakke
58238a43b3 nrf5/modules/ubluepy: Adding new members to the ublupy advertisment parameters, to hold custom data payload if set. 2017-04-02 15:48:32 +02:00
Glenn Ruben Bakke
5f645b6c8e nrf5/modules/ubluepy: Adding compile guard for UBLUEPY_CENTRAL around the char_read() call to ble_drv_attr_c_read(). 2017-04-02 00:31:28 +02:00
Glenn Ruben Bakke
33b1028b50 nrf5/modules/ubluepy: Turn all attributes (addr, addr_type and rssi) to method calls instead of using common .attr callback. Adding getScanData implementation, which parses the advertisment data and returns a list of tuples containing (ad_type, desc, value). Description is generated by peeking into the ad_types local dicts map table, and do a reverse lookup on the value to find the QSTR. 2017-04-01 22:43:54 +02:00
Glenn Ruben Bakke
bb196a2b09 nrf5/modules/ubluepy: Adding ad_types constants in new object. Linking in ad_types object into the ubluepy.constants local dict. 2017-04-01 22:37:39 +02:00
Glenn Ruben Bakke
0887b95bb9 nrf5/modules/ubluepy: Expose ubluepy constant objects as externs in modubluepy.h to be able to get access to the local dict tables in order to do a reverse lookup on value to resolve QSTR from external modules in c. 2017-04-01 22:34:51 +02:00
Glenn Ruben Bakke
706bc97c92 nrf5/modules/ubluepy: Upon advertisment event, also store the advertisment data. 2017-04-01 22:32:55 +02:00
Glenn Ruben Bakke
276073b494 nrf5/modules/ubluepy: Adding callback function to handle read response if gatt client has issued a read request. Also adding method for returning the uuid instance from the object. 2017-04-01 16:39:51 +02:00
Glenn Ruben Bakke
5a7ab4686c nrf5/modules/ubluepy: Adding value data member to the characteristic object. This can hold the value data when gatt client perform a read and value has to be transferred between interrupt and main thread. 2017-04-01 16:36:15 +02:00
Glenn Ruben Bakke
bb7130a813 nrf5/modules/ubluepy: Adding uuid() function to service object to return UUID instance of the service. 2017-03-31 21:52:59 +02:00
Glenn Ruben Bakke
f9a351d527 nrf5/modules/ubluepy: Adding binVal() function to the ubluepy UUID object. For now returning the uint16_t value of the UUID as a small integer. 2017-03-31 21:51:57 +02:00
Glenn Ruben Bakke
7c6f041b8c nrf5/modules/ubluepy: Adding dummy function call to ble_drv_attr_c_read. 2017-03-30 23:44:00 +02:00
Glenn Ruben Bakke
ebb7925a16 nrf5/modules/ubluepy: Tab-fix 2017-03-30 22:53:25 +02:00
Glenn Ruben Bakke
bd2981681f nrf5/modules/ubluepy: Updating peripheral object to handle characteristic discovery (central mode). 2017-03-30 22:47:14 +02:00
Glenn Ruben Bakke
31a71517ab nrf5/modules/ubluepy: Adding start and end handle to service object. 2017-03-30 22:42:08 +02:00
Glenn Ruben Bakke
75148ee6ca nrf5/modules/ubluepy: Updating ubluepy peripheral object to new bluetooth driver API. Starting to populate service objects and uuid objects. Also adding the service to the peripheral object throught the regular static function for adding services. Handle value for the primary service is assuming that it is the first element in the handle range; start_handle reported by the service discovery. 2017-03-29 23:37:32 +02:00
Glenn Ruben Bakke
a139d5e8f7 nrf5/modules/ubluepy: Adding some work in progress on service discovery. 2017-03-28 23:40:28 +02:00
Glenn Ruben Bakke
c230bc021a nrf5/modules/ubluepy: Update connect method to parse dev_addr parameter and pass it to the bluetooth driver, going through a allocated heap buffer. Adding call to the bluetooth driver to issue a connect. Hardcoding address type for now. 2017-03-26 20:45:21 +02:00
Glenn Ruben Bakke
4d147beedb nrf5/modules/ubluepy: Adding template function for central connect() in peripheral object. 2017-03-25 17:51:52 +01:00
Glenn Ruben Bakke
098e64b122 nrf5/modules/ubluepy: Adding locals dict to Scan Entry introducing function to retreive Scan Data. Not working as expected together with .attr. It looks like locals dict functions are treated to be attributes and cannot be resolved. 2017-03-25 17:39:44 +01:00