1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-18 07:52:14 +01:00

Merge branch 'ide-1.5.x' of github.com:dpslwk/Arduino into dpslwk-ide-1.5.x

This commit is contained in:
Cristian Maglie 2014-02-14 15:35:47 +01:00
commit 8504bca280
2 changed files with 10 additions and 8 deletions

View File

@ -343,10 +343,10 @@ static void Wire_Init(void) {
g_APinDescription[PIN_WIRE_SCL].ulPin, g_APinDescription[PIN_WIRE_SCL].ulPin,
g_APinDescription[PIN_WIRE_SCL].ulPinConfiguration); g_APinDescription[PIN_WIRE_SCL].ulPinConfiguration);
NVIC_DisableIRQ(TWI1_IRQn); NVIC_DisableIRQ(WIRE_ISR_ID);
NVIC_ClearPendingIRQ(TWI1_IRQn); NVIC_ClearPendingIRQ(WIRE_ISR_ID);
NVIC_SetPriority(TWI1_IRQn, 0); NVIC_SetPriority(WIRE_ISR_ID, 0);
NVIC_EnableIRQ(TWI1_IRQn); NVIC_EnableIRQ(WIRE_ISR_ID);
} }
TwoWire Wire = TwoWire(WIRE_INTERFACE, Wire_Init); TwoWire Wire = TwoWire(WIRE_INTERFACE, Wire_Init);
@ -370,10 +370,10 @@ static void Wire1_Init(void) {
g_APinDescription[PIN_WIRE1_SCL].ulPin, g_APinDescription[PIN_WIRE1_SCL].ulPin,
g_APinDescription[PIN_WIRE1_SCL].ulPinConfiguration); g_APinDescription[PIN_WIRE1_SCL].ulPinConfiguration);
NVIC_DisableIRQ(TWI0_IRQn); NVIC_DisableIRQ(WIRE1_ISR_ID);
NVIC_ClearPendingIRQ(TWI0_IRQn); NVIC_ClearPendingIRQ(WIRE1_ISR_ID);
NVIC_SetPriority(TWI0_IRQn, 0); NVIC_SetPriority(WIRE1_ISR_ID, 0);
NVIC_EnableIRQ(TWI0_IRQn); NVIC_EnableIRQ(WIRE1_ISR_ID);
} }
TwoWire Wire1 = TwoWire(WIRE1_INTERFACE, Wire1_Init); TwoWire Wire1 = TwoWire(WIRE1_INTERFACE, Wire1_Init);

View File

@ -128,12 +128,14 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define WIRE_INTERFACE TWI1 #define WIRE_INTERFACE TWI1
#define WIRE_INTERFACE_ID ID_TWI1 #define WIRE_INTERFACE_ID ID_TWI1
#define WIRE_ISR_HANDLER TWI1_Handler #define WIRE_ISR_HANDLER TWI1_Handler
#define WIRE_ISR_ID TWI1_IRQn
#define PIN_WIRE1_SDA (70u) #define PIN_WIRE1_SDA (70u)
#define PIN_WIRE1_SCL (71u) #define PIN_WIRE1_SCL (71u)
#define WIRE1_INTERFACE TWI0 #define WIRE1_INTERFACE TWI0
#define WIRE1_INTERFACE_ID ID_TWI0 #define WIRE1_INTERFACE_ID ID_TWI0
#define WIRE1_ISR_HANDLER TWI0_Handler #define WIRE1_ISR_HANDLER TWI0_Handler
#define WIRE1_ISR_ID TWI0_IRQn
/* /*
* UART/USART Interfaces * UART/USART Interfaces