Merge pull request #78 from glennrub/fixes

Fixes
This commit is contained in:
Daniel Tralamazza 2017-06-09 22:27:13 +02:00 committed by GitHub
commit a6b138c9ef
12 changed files with 36 additions and 15 deletions

View File

@ -16,9 +16,9 @@ PA16,PA16
LED1,PA17
LED2,PA19
PA20,PA20
PA25,PA25
I2C_SDA,PA25
I2C_SCL,PA26
I2C_SDA,PA27
PA27,PA27
PA28,PA28,ADC0_IN4
PA29,PA29,ADC0_IN5
PA30,PA30,ADC0_IN6

1 PA2,PA2,ADC0_IN0
16 LED1,PA17
17 LED2,PA19
18 PA20,PA20
19 PA25,PA25 I2C_SDA,PA25
20 I2C_SCL,PA26
21 I2C_SDA,PA27 PA27,PA27
22 PA28,PA28,ADC0_IN4
23 PA29,PA29,ADC0_IN5
24 PA30,PA30,ADC0_IN6

View File

@ -60,9 +60,9 @@
// SPI0 config
#define MICROPY_HW_SPI0_NAME "SPI0"
#define MICROPY_HW_SPI0_SCK (pin_A13)
#define MICROPY_HW_SPI0_MOSI (pin_A15)
#define MICROPY_HW_SPI0_MISO (pin_A14)
#define MICROPY_HW_SPI0_SCK (pin_A23)
#define MICROPY_HW_SPI0_MOSI (pin_A21)
#define MICROPY_HW_SPI0_MISO (pin_A22)
// micro:bit music pin
#define MICROPY_HW_MUSIC_PIN (pin_A3)

View File

@ -1,4 +1,4 @@
PA0,PA0
I2C_SCL,PA0
PA1,PA1
PA2,PA2
PA3,PA3
@ -19,14 +19,14 @@ PA17,PA17
PA18,PA18
PA19,PA19
PA20,PA20
PA21,PA21
PA22,PA22
PA23,PA23
SPI_MOSI,PA21
SPI_MISO,PA22
SPI_SCK,PA23
PA24,PA24
PA25,PA25
PA26,PA26
PA27,PA27
PA28,PA28
PA29,PA29
PA30,PA30
I2C_SDA,PA30
PA31,PA31
1 I2C_SCL PA0 PA0
2 PA1 PA1 PA1
3 PA2 PA2 PA2
4 PA3 PA3 PA3
19 PA18 PA18 PA18
20 PA19 PA19 PA19
21 PA20 PA20 PA20
22 SPI_MOSI PA21 PA21
23 SPI_MISO PA22 PA22
24 SPI_SCK PA23 PA23
25 PA24 PA24 PA24
26 PA25 PA25 PA25
27 PA26 PA26 PA26
28 PA27 PA27 PA27
29 PA28 PA28 PA28
30 PA29 PA29 PA29
31 I2C_SDA PA30 PA30
32 PA31 PA31 PA31

View File

@ -31,6 +31,10 @@
#define MICROPY_PY_SYS_PLATFORM "nrf51-dongle"
#define MICROPY_PY_MACHINE_HW_SPI (0)
#define MICROPY_PY_MACHINE_TIMER (1)
#define MICROPY_PY_MACHINE_RTC (1)
#define MICROPY_PY_MACHINE_I2C (0)
#define MICROPY_PY_MACHINE_ADC (0)
#define MICROPY_PY_MACHINE_TEMP (1)
#define MICROPY_HW_HAS_LED (1)

View File

@ -2,6 +2,8 @@
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_TEMP_MODULE_ENABLED

View File

@ -31,6 +31,10 @@
#define MICROPY_PY_SYS_PLATFORM "nrf51-DK"
#define MICROPY_PY_MACHINE_HW_SPI (0)
#define MICROPY_PY_MACHINE_TIMER (1)
#define MICROPY_PY_MACHINE_RTC (1)
#define MICROPY_PY_MACHINE_I2C (1)
#define MICROPY_PY_MACHINE_ADC (1)
#define MICROPY_PY_MACHINE_TEMP (1)
#define MICROPY_HW_HAS_LED (1)

View File

@ -2,7 +2,7 @@
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED

View File

@ -30,6 +30,11 @@
#define MICROPY_HW_MCU_NAME "NRF51822"
#define MICROPY_PY_SYS_PLATFORM "nrf51-dongle"
#define MICROPY_PY_MACHINE_HW_SPI (1)
#define MICROPY_PY_MACHINE_TIMER (1)
#define MICROPY_PY_MACHINE_RTC (1)
#define MICROPY_PY_MACHINE_I2C (1)
#define MICROPY_PY_MACHINE_ADC (1)
#define MICROPY_PY_MACHINE_TEMP (1)
#define MICROPY_HW_HAS_LED (1)

View File

@ -4,6 +4,10 @@
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#define HAL_TWI_MODULE_ENABLED
#define HAL_ADC_MODULE_ENABLED
#define HAL_TEMP_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__

View File

@ -32,6 +32,8 @@
#define MICROPY_PY_MACHINE_HW_PWM (1)
#define MICROPY_PY_MACHINE_HW_SPI (1)
#define MICROPY_PY_MACHINE_TIMER (1)
#define MICROPY_PY_MACHINE_RTC (1)
#define MICROPY_PY_MACHINE_I2C (1)
#define MICROPY_PY_MACHINE_ADC (1)
#define MICROPY_PY_MACHINE_TEMP (1)

View File

@ -1,7 +1,7 @@
#ifndef NRF52_HAL_CONF_H__
#define NRF52_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_PWM_MODULE_ENABLED
@ -10,7 +10,7 @@
#define HAL_TWI_MODULE_ENABLED
#define HAL_ADCE_MODULE_ENABLED
#define HAL_TEMP_MODULE_ENABLED
// #define HAL_UARTE_MODULE_ENABLED
#define HAL_UARTE_MODULE_ENABLED
// #define HAL_SPIE_MODULE_ENABLED
// #define HAL_TWIE_MODULE_ENABLED

View File

@ -14,7 +14,7 @@
# Example usage of SSD1306_I2C on pca10040
#
# from machine import Pin, I2C
# from ssd1306 import SSD1306_I2C
# from ssd1306_mod import SSD1306_I2C_Mod
# i2c = I2C(0, Pin.board.PA3, Pin.board.PA4)
# disp = SSD1306_I2C_Mod(128, 64, i2c)