Changeset d558bc49 in rtems


Ignore:
Timestamp:
11/08/11 10:08:14 (12 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
d922dab
Parents:
edb1dd83
Message:

2011-11-08 Sebastian Huber <sebastian.huber@…>

  • include/utility.h: Fixed some casts.
  • include/irq-generic.h: Define bsp_interrupt_handler_index_type conditionally.
Location:
c/src/lib/libbsp/shared
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    redb1dd83 rd558bc49  
     12011-11-08      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * include/utility.h: Fixed some casts.
     4        * include/irq-generic.h: Define bsp_interrupt_handler_index_type
     5        conditionally.
     6
    172011-11-07      Sebastian Huber <sebastian.huber@embedded-brains.de>
    28
  • c/src/lib/libbsp/shared/include/irq-generic.h

    redb1dd83 rd558bc49  
    6666
    6767#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
     68  #if BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x100
     69    typedef uint8_t bsp_interrupt_handler_index_type;
     70  #elif BSP_INTERRUPT_HANDLER_TABLE_SIZE < 0x10000
     71    typedef uint16_t bsp_interrupt_handler_index_type;
     72  #else
     73    typedef uint32_t bsp_interrupt_handler_index_type;
     74  #endif
    6875  extern bsp_interrupt_handler_index_type bsp_interrupt_handler_index_table [];
    6976#endif
     
    103110 * @ref BSP_INTERRUPT_USE_INDEX_TABLE.  With an enabled index table the handler
    104111 * table will be accessed via a small index table.  You can define the size of
    105  * the handler table with @ref BSP_INTERRUPT_HANDLER_TABLE_SIZE.  You must
    106  * provide a data type for the index table
    107  * (@ref bsp_interrupt_handler_index_type).  It must be an integer type big
    108  * enough to index the complete handler table.
     112 * the handler table with @ref BSP_INTERRUPT_HANDLER_TABLE_SIZE.
    109113 *
    110114 * Normally new list entries are allocated from the heap.  You may define
  • c/src/lib/libbsp/shared/include/utility.h

    redb1dd83 rd558bc49  
    88
    99/*
    10  * Copyright (c) 2008, 2010
    11  * embedded brains GmbH
    12  * Obere Lagerstr. 30
    13  * D-82178 Puchheim
    14  * Germany
    15  * <rtems@embedded-brains.de>
     10 * Copyright (c) 2008-2011 embedded brains GmbH.  All rights reserved.
     11 *
     12 *  embedded brains GmbH
     13 *  Obere Lagerstr. 30
     14 *  82178 Puchheim
     15 *  Germany
     16 *  <rtems@embedded-brains.de>
    1617 *
    1718 * The license and distribution terms for this file may be
    1819 * found in the file LICENSE in this distribution or at
    1920 * http://www.rtems.com/license/LICENSE.
     21 *
     22 * $Id$
    2023 */
    2124
     
    2629
    2730#define BSP_BIT8(bit) \
    28   ((uint8_t) (((uint8_t) 1) << (bit)))
     31  ((uint8_t) (((unsigned int) 1) << (bit)))
    2932
    3033#define BSP_MSK8(first_bit, last_bit) \
     
    3235
    3336#define BSP_FLD8(val, first_bit, last_bit) \
    34   ((uint8_t) (((val) << (first_bit)) & BSP_MSK8(first_bit, last_bit)))
     37  ((uint8_t) \
     38    ((((unsigned int) (val)) << (first_bit)) & BSP_MSK8(first_bit, last_bit)))
    3539
    3640#define BSP_FLD8GET(reg, first_bit, last_bit) \
     
    4246
    4347#define BSP_BIT16(bit) \
    44   ((uint16_t) (((uint16_t) 1) << (bit)))
     48  ((uint16_t) (((unsigned int) 1) << (bit)))
    4549
    4650#define BSP_MSK16(first_bit, last_bit) \
     
    4852
    4953#define BSP_FLD16(val, first_bit, last_bit) \
    50   ((uint16_t) (((val) << (first_bit)) & BSP_MSK16(first_bit, last_bit)))
     54  ((uint16_t) \
     55    ((((unsigned int) (val)) << (first_bit)) & BSP_MSK16(first_bit, last_bit)))
    5156
    5257#define BSP_FLD16GET(reg, first_bit, last_bit) \
     
    6469
    6570#define BSP_FLD32(val, first_bit, last_bit) \
    66   ((uint32_t) (((val) << (first_bit)) & BSP_MSK32(first_bit, last_bit)))
     71  ((uint32_t) \
     72    ((((uint32_t) (val)) << (first_bit)) & BSP_MSK32(first_bit, last_bit)))
    6773
    6874#define BSP_FLD32GET(reg, first_bit, last_bit) \
     
    8086
    8187#define BSP_FLD64(val, first_bit, last_bit) \
    82   ((uint64_t) (((val) << (first_bit)) & BSP_MSK64(first_bit, last_bit)))
     88  ((uint64_t) \
     89    ((((uint64_t) (val)) << (first_bit)) & BSP_MSK64(first_bit, last_bit)))
    8390
    8491#define BSP_FLD64GET(reg, first_bit, last_bit) \
Note: See TracChangeset for help on using the changeset viewer.