1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/stm32f1/include/cpu_conf.h

84 lines
1.6 KiB
C
Raw Normal View History

2014-06-11 14:59:24 +02:00
/*
* Copyright (C) 2013 INRIA
* Copyright (C) 2014 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @defgroup cpu_stm32f1 STM32F1
* @ingroup cpu
2014-06-11 14:59:24 +02:00
* @brief CPU specific implementations for the STM32F1
* @{
*
* @file
* @brief Implementation specific CPU configuration options
*
* @author Alaeddine Weslati <alaeddine.weslati@intia.fr>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
2014-11-30 21:18:24 +01:00
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
2014-06-11 14:59:24 +02:00
#include "stm32f10x.h"
2014-10-13 10:53:20 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2014-06-11 14:59:24 +02:00
/**
* @name Kernel configuration
*
* TODO: measure and adjust for the cortex-m3
* @{
*/
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
2014-06-11 14:59:24 +02:00
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
2014-06-11 14:59:24 +02:00
#endif
#define THREAD_STACKSIZE_IDLE (256)
2014-06-11 14:59:24 +02:00
/** @} */
/**
* @name UART0 buffer size definition for compatibility reasons
*
* TODO: remove once the remodeling of the uart0 driver is done
* @{
*/
#ifndef UART0_BUFSIZE
#define UART0_BUFSIZE (128)
#endif
/** @} */
/**
2014-11-30 21:18:24 +01:00
* @brief Length for reading CPU_ID
2014-06-11 14:59:24 +02:00
*/
#define CPUID_ID_LEN (12)
2014-06-11 14:59:24 +02:00
/**
2014-11-30 21:18:24 +01:00
* @brief Definition of different panic modes
2014-06-11 14:59:24 +02:00
*/
typedef enum {
HARD_FAULT,
WATCHDOG,
BUS_FAULT,
USAGE_FAULT,
DUMMY_HANDLER
} panic_t;
void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale);
2014-07-03 10:36:46 +02:00
#define TRANSCEIVER_BUFFER_SIZE (3)
2014-10-13 10:53:20 +02:00
#ifdef __cplusplus
}
#endif
2014-06-11 14:59:24 +02:00
#endif /* __CPU_CONF_H */
/** @} */