git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2345 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2010-11-10 21:46:34 +00:00
parent e4cdc96106
commit a7b039fae4
5 changed files with 13 additions and 23 deletions

View File

@ -76,25 +76,15 @@ exception_vector_t const _vectab[] = {
#endif
{0x82, vector}, /* vector11 */
{0x82, vector}, /* vector12 */
{0x82, vector13}, /* vector13 */
{0x82, vector}, /* vector13 */
{0x82, vector}, /* vector14 */
{0x82, vector}, /* vector15 */
{0x82, vector}, /* vector16 */
#if HAL_USE_SERIAL && STM8_SERIAL_USE_UART1
{0x82, vector17}, /* vector17 */
{0x82, vector18}, /* vector18 */
#else
{0x82, vector}, /* vector17 */
{0x82, vector}, /* vector18 */
#endif
{0x82, vector}, /* vector19 */
#if HAL_USE_SERIAL && (STM8_SERIAL_USE_UART2 || STM8_SERIAL_USE_UART3)
{0x82, vector20}, /* vector20 */
{0x82, vector21}, /* vector21 */
#else
{0x82, vector}, /* vector20 */
{0x82, vector}, /* vector21 */
#endif
{0x82, vector}, /* vector22 */
{0x82, vector}, /* vector23 */
{0x82, vector}, /* vector24 */

View File

@ -41,7 +41,7 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#define HAL_USE_PAL FALSE
#endif
/**
@ -90,7 +90,7 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL TRUE
#define HAL_USE_SERIAL FALSE
#endif
/**

View File

@ -29,9 +29,9 @@ static msg_t Thread1(void *arg) {
(void)arg;
while (TRUE) {
palClearPad(GPIOD, PD_LD10);
// palClearPad(GPIOD, PD_LD10);
chThdSleepMilliseconds(500);
palSetPad(GPIOD, PD_LD10);
// palSetPad(GPIOD, PD_LD10);
chThdSleepMilliseconds(500);
}
return 0;
@ -55,7 +55,7 @@ void main(void) {
/*
* Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD2, NULL);
// sdStart(&SD2, NULL);
/*
* Creates the blinker thread.
@ -66,10 +66,10 @@ void main(void) {
* Normal main() thread activity.
*/
while (TRUE) {
if (palReadPad(GPIOG, 0) == PAL_LOW)
TestThread(&SD2);
if (palReadPad(GPIOG, 1) == PAL_LOW)
sdWriteTimeout(&SD2, "Hello World!\r\n", 14, TIME_INFINITE);
// if (palReadPad(GPIOG, 0) == PAL_LOW)
// TestThread(&SD2);
// if (palReadPad(GPIOG, 1) == PAL_LOW)
// sdWriteTimeout(&SD2, "Hello World!\r\n", 14, TIME_INFINITE);
chThdSleepMilliseconds(1000);
}
}

View File

@ -39,7 +39,7 @@
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
*//*
ROMCONST PALConfig pal_default_config =
{
{
@ -55,7 +55,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOIODR, 0, VAL_GPIOIDDR, VAL_GPIOICR1, VAL_GPIOICR2},
#endif
}
};
};*/
/*===========================================================================*/
/* Driver local functions. */

View File

@ -228,7 +228,7 @@
#define RTCCLK (LSICLK / (1 << STM8L_RTCCLK_DIVIDER))
#elif STM8L_RTCCLK_SOURCE == CLK_RTCSEL_HSE
#define RTCCLK (HSECLK / (1 << STM8L_RTCCLK_DIVIDER))
#elif STM8L_SYSCLK_SOURCE == CLK_RTCSEL_LSE
#elif STM8L_RTCCLK_SOURCE == CLK_RTCSEL_LSE
#define RTCCLK (LSECLK / (1 << STM8L_RTCCLK_DIVIDER))
#else
#error "specified invalid RTCCLK source"