use stdint.h instead of custom types.h

stdint.h is more portable across compilers
This commit is contained in:
Mariano Alvira 2010-11-10 15:44:38 -05:00
parent 57a8a204b2
commit 3ec4b267fc
10 changed files with 9 additions and 56 deletions

View file

@ -34,7 +34,7 @@
*/ */
#include <mc1322x.h> #include <mc1322x.h>
#include <types.h> #include <stdint.h>
inline void gpio_pad_dir(volatile uint64_t data) inline void gpio_pad_dir(volatile uint64_t data)
{ {

View file

@ -36,7 +36,7 @@
#ifndef CRM_H #ifndef CRM_H
#define CRM_H #define CRM_H
#include <types.h> #include <stdint.h>
#define CRM_BASE (0x80003000) #define CRM_BASE (0x80003000)

View file

@ -36,6 +36,8 @@
#ifndef ISR_H #ifndef ISR_H
#define ISR_H #define ISR_H
#include <stdint.h>
#define INTBASE (0x80020000) #define INTBASE (0x80020000)
/* Structure-based ITC access */ /* Structure-based ITC access */

View file

@ -37,7 +37,7 @@
#define _MACA_H_ #define _MACA_H_
#include <packet.h> #include <packet.h>
#include <types.h> #include <stdint.h>
#include <utils.h> #include <utils.h>
/* maca initialization and on off routines */ /* maca initialization and on off routines */

View file

@ -36,7 +36,6 @@
#ifndef MC1322X_H #ifndef MC1322X_H
#define MC1322X_H #define MC1322X_H
#include "types.h"
#include "isr.h" #include "isr.h"
#include "gpio.h" #include "gpio.h"
#include "crm.h" #include "crm.h"

View file

@ -36,7 +36,7 @@
#ifndef NVM_H #ifndef NVM_H
#define NVM_H #define NVM_H
#include "types.h" #include <stdint.h>
typedef enum typedef enum
{ {

View file

@ -1,48 +0,0 @@
/*
* Copyright (c) 2010, Mariano Alvira <mar@devl.org> and other contributors
* to the MC1322x project (http://mc1322x.devl.org)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id$
*/
#ifndef _TYPES_H
#define _TYPES_H
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
#endif

View file

@ -36,7 +36,7 @@
#ifndef UART1_H #ifndef UART1_H
#define UART1_H #define UART1_H
#include <types.h> #include <stdint.h>
#define UCON (0) #define UCON (0)
/* UCON bits */ /* UCON bits */

View file

@ -70,7 +70,7 @@
#include <string.h> #include <string.h>
#include <mc1322x.h> #include <mc1322x.h>
#include <types.h> #include <stdint.h>
#define __putc(x) uart1_putc(x) #define __putc(x) uart1_putc(x)

View file

@ -34,7 +34,7 @@
*/ */
#include <mc1322x.h> #include <mc1322x.h>
#include <types.h> #include <stdint.h>
volatile char u1_tx_buf[64]; volatile char u1_tx_buf[64];
volatile uint32_t u1_head, u1_tail; volatile uint32_t u1_head, u1_tail;