Daniel Tralamazza
baedc380bf
Merge pull request #55 from glennrub/align_rtc_and_timer
...
nrf5/hal/rtc: Aligning RTC (real-time counter) HAL driver with Timer …
2017-06-03 22:52:35 +02:00
Glenn Ruben Bakke
ea95dcba4d
nrf5/hal/timer: Update timer hal to use value provided in init to configure the irq_priority.
2017-06-02 19:21:51 +02:00
Glenn Ruben Bakke
f49f20a24e
nrf5/hal/timer: Implementing hal_timer to 1us prescaler. Multiplier inside to get to millisecond resolution. Callback must be registered before starting a timer.
2017-06-02 19:21:51 +02:00
Glenn Ruben Bakke
45303796d7
nrf5/hal/rtc: Updating hal driver to calculate prescaler a bit more verbose. Using 1 second interval ticks.
2017-06-02 19:04:19 +02:00
Glenn Ruben Bakke
147e579e28
nrf5/hal/rtc: Aligning RTC (real-time counter) HAL driver with Timer HAL driver. To make api's symetric. Also updating modules/rtc to get aligned with new HAL api.
2017-06-01 23:05:42 +02:00
Glenn Ruben Bakke
d9813910da
nrf5/modules/machine/timer: If timer is used in combination with SOFT_PWM (implicitly use of ticker.c) guard the Timer1 instance from being instantiated trough python timer module. Also disable implementation of the HAL IRQ handler which is for now explicitly implemented in ticker.c for Timer1.
2017-05-25 00:25:14 +02:00
Glenn Ruben Bakke
2f40c61c3e
nrf5/hal/irq: Adding wrappers for handling nvic calls when Bluetooth LE stack is enabled.
2017-05-25 00:25:14 +02:00
Glenn Ruben Bakke
003f43b5c9
nrf5/hal/irq: Adding include of nrf_nvic.h if s132 bluetooth stack is used to resolve IRQ function wrappers on newer bluetooth stacks.
2017-05-18 23:20:25 +02:00
Glenn Ruben Bakke
981b3e61dd
nrf5/hal/irq: Adding IRQ wrappers if Bluetooth Stack is present.
2017-05-18 23:11:41 +02:00
Glenn Ruben Bakke
6f72e73137
nrf5/hal/timer: Quickfix. Disable IRQ handler if SOFT_PWM is configured to be enabled. Ticker driver has in current driver a seperate IRQ handler for this timer instance.
2017-05-18 23:11:41 +02:00
Glenn Ruben Bakke
130a00fdeb
nrf5/hal/timer: Adding start/stop template functions to hal_timer.h/.c
2017-05-08 22:10:02 +02:00
Glenn Ruben Bakke
a4513f0159
nrf5/hal/gpio: Add function to clear output register using a pin mask.
2017-05-08 21:20:08 +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
0437fafaac
nrf5/hal/timer: Adding empty IRQ handlers for all timers.
2017-04-30 19:42:54 +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
d0d350da16
nrf5/hal/pwm: Updating PWM implementation to support manually set duty cycle period. Pulse width has precidence over duty cycle percentage. Also adding support for the two configurable modes, high to low, and low to high, duty cycles.
2017-04-18 20:56:19 +02:00
Glenn Ruben Bakke
4d56f2a76d
nrf5/hal/pwm: Adding more configuration options to the PWM peripheral wrapper. Possibility to set pulse with manually, and also mode. The mode indicates whether duty cycle is low and then goes high, or if it is high and then go low. Added new type to describe the two modes.
2017-04-18 20:53:55 +02:00
Glenn Ruben Bakke
81aaf6e906
nrf5/hal/gpio: Adding initial gpiote implementation to handle IRQ on polarity change on a gpio.
2017-04-11 13:57:44 +02:00
Glenn Ruben Bakke
adf316afaa
nrf5/hal/gpio: Adding some new structures and functions to register irq channels to gpio's using GPIOTE peripheral
2017-04-11 13:53:37 +02:00
Glenn Ruben Bakke
f8c0a51f5e
nrf5/hal/gpio: Adding missing include.
2017-04-09 23:47:44 +02:00
Glenn Ruben Bakke
a93d462dfd
nrf5/hal/gpio: Reintroducing gpio polarity toggle event to be able to reference the short form of adding high_to_low and low_to_high together.
2017-04-09 23:02:37 +02:00
Glenn Ruben Bakke
435bc5a3d4
nrf5/hal/gpio: Updating hal_gpio.h with some tab-fixes in order to make the file a bit consistent in style.
2017-04-09 21:56:28 +02:00
Glenn Ruben Bakke
8c45aca8d2
nrf5/hal/gpio: Removing toggle event from the enumeration as that will be a combination of the rising and falling together.
2017-04-09 21:54:09 +02:00
Glenn Ruben Bakke
07edf4f26d
nrf5/hal/gpio: Adding new enumeration for input polarity change events.
2017-04-09 21:49:02 +02:00
Glenn Ruben Bakke
3b15d33809
nrf5/hal: Moving hal_gpio functions, types and defines from mphalport.h to a new hal_gpio.h.
2017-04-09 21:39:15 +02:00
Glenn Ruben Bakke
611b829138
nrf5/uart: Refactoring UART module and HAL driver
...
Facilitating for adding second HW uart. Moving pyb_uart into
machine_uart. Adding return error codes from hal_uart functions,
if the hardware detects an error.
2017-03-10 22:21:19 +01:00
Glenn Ruben Bakke
c301cca2a4
nrf5/hal: hal_rtc update. Adding current counter value to period value before setting it in the compare register.
2017-03-06 20:52:09 +01:00
Glenn Ruben Bakke
87e1616488
nrf5/hal: Adding initialization of LFCLK if not already enabled in hal_rtc.
2017-03-06 20:06:47 +01:00
Glenn Ruben Bakke
ff7541599a
nrf5/hal: Updating hal RTC implementation.
2017-03-06 00:53:21 +01:00
Glenn Ruben Bakke
852aaba58b
nrf5/hal: Adding hal_irq.h which defines a set of static inline functions to do nvic irq operations.
2017-03-06 00:50:00 +01:00
Glenn Ruben Bakke
0489153094
nrf5/hal: Renaming uart hal function to use hal_uart prefix.
2017-03-05 22:37:07 +01:00
Glenn Ruben Bakke
2c61b7f596
nrf5/hal: Adding untested implementation of twi read. Lacking sensors to test with :)
2017-03-04 21:42:36 +01:00
Bander Ajba
0e723091f9
minor documentation and extra tabs removal fixes
2017-02-28 09:34:13 +03:00
Bander Ajba
e52ebb095c
fixed temp module to allow for instance support
2017-02-27 21:37:32 +03:00
Bander Ajba
378c40b4da
did required modification to merge the temperature sensore module
2017-02-26 11:14:17 +03:00
Bander Ajba
3882b0e2ff
added support for hardware temperature sensor
2017-02-24 00:38:08 +03:00
Glenn Ruben Bakke
e8b4a97d7d
nrf5/hal: Line wrapping params in hal_spi.c to make it easier to read.
2017-02-02 23:47:30 +01:00
Glenn Ruben Bakke
cd096f604e
nrf5/hal: Updating hal_twi.c tx implementation to a working state. STARTTX only issued once, before looping bytes.
2017-02-02 23:45:44 +01:00
Glenn Ruben Bakke
c7162720c1
nrf5/hal: Updating hal_twi.c with tx function. Gets multiple startup bytes for each clocked byte.
2017-02-02 22:55:25 +01:00
Glenn Ruben Bakke
fed06e278b
nrf5/hal: Updating hal_twi.c with tx function which partly works. Bytes are clocked out a bit out of order.
2017-02-02 20:51:43 +01:00
Glenn Ruben Bakke
0629abac53
nrf5/hal: Started implementation of hal_twi.c (non-DMA). Init function started.
2017-02-02 20:03:50 +01:00
Glenn Ruben Bakke
4b38644531
nrf5/hal: Updating twi driver with template functions.
2017-01-31 22:46:04 +01:00
Glenn Ruben Bakke
4a568ec1ed
nrf5/hal: Updating TWI DMA implementation. Suspend not working on tx. Rx not implemented yet.
2017-01-31 22:36:47 +01:00
Glenn Ruben Bakke
5004a6f811
nrf5/hal: Updating twi master tx with stop parameter.
2017-01-30 23:05:27 +01:00
Glenn Ruben Bakke
ed976e07fe
nrf5/hal: Adding i2c master functions for tx and rx in hal header.
2017-01-30 21:32:20 +01:00
Glenn Ruben Bakke
97a3fd4f3a
nrf5/hal: Adding members to TWI config struct, device address and scl/sda pin. Renaming and adding function such that twi slave and master has seperate init function. Started implementation of master init function for nrf52 using DMA (hal_twie.c).
2017-01-28 23:45:30 +01:00
Glenn Ruben Bakke
1c778f020f
nrf5/hal: Updating TWI with frequency enums.
2017-01-28 22:54:44 +01:00
Glenn Ruben Bakke
87e7ab8862
nrf5/hal: Fixing nrf51 SPI pin configuration to use pin member of struct.
2017-01-26 22:31:23 +01:00
Glenn Ruben Bakke
0b0cb19608
nrf5/hal: Updating hal QSPI header with define guard to filter out usage of undefined structures and names when compiling against non-52840 targets.
2017-01-26 22:10:36 +01:00
Glenn Ruben Bakke
0254cab228
nrf5/hal: Updating SPI DMA variant with more frequencies, and allowing rx and tx buffers to be NULL.
2017-01-26 22:01:43 +01:00