I2C. Merged code from trunk.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3561 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
commit
d34bc423c8
|
@ -84,22 +84,7 @@
|
||||||
#define PIN_PUDR_FLOATING(n) (0 << ((n) * 2))
|
#define PIN_PUDR_FLOATING(n) (0 << ((n) * 2))
|
||||||
#define PIN_PUDR_PULLUP(n) (1 << ((n) * 2))
|
#define PIN_PUDR_PULLUP(n) (1 << ((n) * 2))
|
||||||
#define PIN_PUDR_PULLDOWN(n) (2 << ((n) * 2))
|
#define PIN_PUDR_PULLDOWN(n) (2 << ((n) * 2))
|
||||||
#define PIN_AFIO_AF0(n) (0 << ((n % 8) * 4))
|
#define PIN_AFIO_AF(n, v) ((v##U) << ((n % 8) * 4))
|
||||||
#define PIN_AFIO_AF1(n) (1 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF2(n) (2 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF3(n) (3 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF4(n) (4 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF5(n) (5 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF6(n) (6 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF7(n) (7 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF8(n) (8 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF9(n) (9 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF10(n) (10 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF11(n) (11 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF12(n) (12 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF13(n) (13 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF14(n) (14 << ((n % 8) * 4))
|
|
||||||
#define PIN_AFIO_AF15(n) (15 << ((n % 8) * 4))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Port A setup.
|
* Port A setup.
|
||||||
|
@ -157,8 +142,8 @@
|
||||||
PIN_PUDR_FLOATING(15)))
|
PIN_PUDR_FLOATING(15)))
|
||||||
#define VAL_GPIOC_ODR 0xFFFFFFFF
|
#define VAL_GPIOC_ODR 0xFFFFFFFF
|
||||||
#define VAL_GPIOC_AFRL 0x00000000
|
#define VAL_GPIOC_AFRL 0x00000000
|
||||||
#define VAL_GPIOC_AFRH (PIN_AFIO_AF7(10) | \
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(7, 10) | \
|
||||||
PIN_AFIO_AF7(11))
|
PIN_AFIO_AF(7, 11))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Port D setup.
|
* Port D setup.
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#define PIN_PUDR_FLOATING(n) (0U << ((n) * 2))
|
#define PIN_PUDR_FLOATING(n) (0U << ((n) * 2))
|
||||||
#define PIN_PUDR_PULLUP(n) (1U << ((n) * 2))
|
#define PIN_PUDR_PULLUP(n) (1U << ((n) * 2))
|
||||||
#define PIN_PUDR_PULLDOWN(n) (2U << ((n) * 2))
|
#define PIN_PUDR_PULLDOWN(n) (2U << ((n) * 2))
|
||||||
#define PIN_AFIO_AF(n, v) ((v)U << ((n % 8) * 4))
|
#define PIN_AFIO_AF(n, v) ((v##U) << ((n % 8) * 4))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Port A setup.
|
* Port A setup.
|
||||||
|
|
|
@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.3.4
|
PROJECT_NUMBER = 2.3.5
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer
|
# for a project that appears at the top of each page and should give viewer
|
||||||
|
|
|
@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.3.4
|
PROJECT_NUMBER = 2.3.5
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer
|
# for a project that appears at the top of each page and should give viewer
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">ChibiOS/RT <span id="projectnumber">2.3.4</span></div>
|
<div id="projectname">ChibiOS/RT <span id="projectnumber">2.3.5</span></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -20,7 +20,7 @@ $(document).ready(initResizable);
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="height: 92px;">
|
<tr style="height: 92px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">ChibiOS/RT<br><span id="projectnumber">2.3.4</span></div>
|
<div id="projectname">ChibiOS/RT<br><span id="projectnumber">2.3.5</span></div>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding-left: 3em;">
|
<td style="padding-left: 3em;">
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
|
|
|
@ -360,7 +360,7 @@ void icu_lld_start(ICUDriver *icup) {
|
||||||
icup->tim->ARR = 0xFFFF;
|
icup->tim->ARR = 0xFFFF;
|
||||||
|
|
||||||
/* CCMR1_CC1S = 01 = CH1 Input on TI1.
|
/* CCMR1_CC1S = 01 = CH1 Input on TI1.
|
||||||
CCMR1_CC2S = 10 = CH2 Input on TI2.*/
|
CCMR1_CC2S = 10 = CH2 Input on TI1.*/
|
||||||
icup->tim->CCMR1 = TIM_CCMR1_CC1S_0 |
|
icup->tim->CCMR1 = TIM_CCMR1_CC1S_0 |
|
||||||
TIM_CCMR1_CC2S_1;
|
TIM_CCMR1_CC2S_1;
|
||||||
/* SMCR_TS = 101, input is TI1FP1.
|
/* SMCR_TS = 101, input is TI1FP1.
|
||||||
|
|
|
@ -63,21 +63,6 @@
|
||||||
#include "stm32l1xx.h"
|
#include "stm32l1xx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef TIM1
|
|
||||||
#undef TIM2
|
|
||||||
#undef TIM3
|
|
||||||
#undef TIM4
|
|
||||||
#undef TIM5
|
|
||||||
#undef TIM6
|
|
||||||
#undef TIM7
|
|
||||||
#undef TIM8
|
|
||||||
#undef TIM9
|
|
||||||
#undef TIM10
|
|
||||||
#undef TIM11
|
|
||||||
#undef TIM12
|
|
||||||
#undef TIM13
|
|
||||||
#undef TIM14
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -62,8 +62,9 @@ void hal_lld_init(void) {
|
||||||
been initialized in the board initialization file (board.c).*/
|
been initialized in the board initialization file (board.c).*/
|
||||||
rccResetAHB1(!0);
|
rccResetAHB1(!0);
|
||||||
rccResetAHB2(!0);
|
rccResetAHB2(!0);
|
||||||
|
rccResetAHB3(!0);
|
||||||
rccResetAPB1(!RCC_APB1RSTR_PWRRST);
|
rccResetAPB1(!RCC_APB1RSTR_PWRRST);
|
||||||
rccResetAPB2(!RCC_APB2RSTR_SYSCFGRST);
|
rccResetAPB2(!0);
|
||||||
|
|
||||||
/* SysTick initialization using the system clock.*/
|
/* SysTick initialization using the system clock.*/
|
||||||
SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1;
|
SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1;
|
||||||
|
@ -152,6 +153,10 @@ void stm32_clock_init(void) {
|
||||||
;
|
;
|
||||||
#endif
|
#endif
|
||||||
#endif /* STM32_NO_INIT */
|
#endif /* STM32_NO_INIT */
|
||||||
|
|
||||||
|
/* SYSCFG clock enabled here because it is a multi-functional unit shared
|
||||||
|
among multiple drivers.*/
|
||||||
|
rccEnableAPB2(RCC_APB2ENR_SYSCFGEN, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -60,8 +60,8 @@ void hal_lld_init(void) {
|
||||||
|
|
||||||
/* Reset of all peripherals.*/
|
/* Reset of all peripherals.*/
|
||||||
rccResetAHB(!RCC_AHBRSTR_FLITFRST);
|
rccResetAHB(!RCC_AHBRSTR_FLITFRST);
|
||||||
rccResetAPB1(!0);
|
rccResetAPB1(!RCC_APB1RSTR_PWRRST);
|
||||||
rccResetAPB2(!RCC_APB2RSTR_SYSCFGRST);
|
rccResetAPB2(!0);
|
||||||
|
|
||||||
/* SysTick initialization using the system clock.*/
|
/* SysTick initialization using the system clock.*/
|
||||||
SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1;
|
SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1;
|
||||||
|
@ -170,6 +170,10 @@ void stm32_clock_init(void) {
|
||||||
;
|
;
|
||||||
#endif
|
#endif
|
||||||
#endif /* STM32_NO_INIT */
|
#endif /* STM32_NO_INIT */
|
||||||
|
|
||||||
|
/* SYSCFG clock enabled here because it is a multi-functional unit shared
|
||||||
|
among multiple drivers.*/
|
||||||
|
rccEnableAPB2(RCC_APB2ENR_SYSCFGEN, TRUE);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void stm32_clock_init(void) {}
|
void stm32_clock_init(void) {}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Kernel version string.
|
* @brief Kernel version string.
|
||||||
*/
|
*/
|
||||||
#define CH_KERNEL_VERSION "2.3.4unstable"
|
#define CH_KERNEL_VERSION "2.3.5unstable"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Kernel version
|
* @name Kernel version
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Kernel version patch number.
|
* @brief Kernel version patch number.
|
||||||
*/
|
*/
|
||||||
#define CH_KERNEL_PATCH 4
|
#define CH_KERNEL_PATCH 5
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -73,6 +73,10 @@
|
||||||
*** Releases ***
|
*** Releases ***
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
|
*** 2.3.5 ***
|
||||||
|
- FIX: Fixed SYSCFG clock not started in STM32L1/F4 HALs (bug 3449139).
|
||||||
|
- FIX: Fixed wrong definitions in STM32L-Discovery board file (bug 3449076).
|
||||||
|
|
||||||
*** 2.3.4 ***
|
*** 2.3.4 ***
|
||||||
- FIX: Fixed Extra initialization in STM32 SPI driver (bug 3436127)
|
- FIX: Fixed Extra initialization in STM32 SPI driver (bug 3436127)
|
||||||
(backported to 2.2.8).
|
(backported to 2.2.8).
|
||||||
|
|
Loading…
Reference in New Issue