use stdint.h instead of custom types.h

stdint.h is more portable across compilers
This commit is contained in:
maralvira 2010-11-10 22:06:28 +00:00
parent e229022f38
commit 6da84819dd
11 changed files with 20 additions and 67 deletions

View file

@ -30,11 +30,11 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: gpio.c,v 1.1 2010/06/10 14:55:39 maralvira Exp $
* $Id: gpio.c,v 1.2 2010/11/10 22:06:28 maralvira Exp $
*/
#include <mc1322x.h>
#include <types.h>
#include <stdint.h>
inline void gpio_pad_dir(volatile uint64_t data)
{

View file

@ -30,13 +30,13 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: crm.h,v 1.5 2010/11/07 14:42:31 maralvira Exp $
* $Id: crm.h,v 1.6 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef CRM_H
#define CRM_H
#include <types.h>
#include <stdint.h>
#define CRM_BASE (0x80003000)

View file

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: isr.h,v 1.5 2010/11/07 14:26:24 maralvira Exp $
* $Id: isr.h,v 1.6 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef ISR_H
@ -38,6 +38,8 @@
#define INTBASE (0x80020000)
#include <stdint.h>
/* Structure-based ITC access */
#define __INTERRUPT_union(x) \
union { \

View file

@ -30,14 +30,14 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: maca.h,v 1.2 2010/11/07 14:06:57 maralvira Exp $
* $Id: maca.h,v 1.3 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef _MACA_H_
#define _MACA_H_
#include <packet.h>
#include <types.h>
#include <stdint.h>
#include <utils.h>
/* maca initialization and on off routines */

View file

@ -30,13 +30,12 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: mc1322x.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $
* $Id: mc1322x.h,v 1.2 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef MC1322X_H
#define MC1322X_H
#include "types.h"
#include "isr.h"
#include "gpio.h"
#include "crm.h"

View file

@ -30,13 +30,13 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: nvm.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $
* $Id: nvm.h,v 1.2 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef NVM_H
#define NVM_H
#include "types.h"
#include "stdint.h"
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: types.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $
*/
#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

@ -30,13 +30,13 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: uart1.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $
* $Id: uart1.h,v 1.2 2010/11/10 22:06:28 maralvira Exp $
*/
#ifndef UART1_H
#define UART1_H
#include <types.h>
#include <stdint.h>
#define UCON (0)
/* UCON bits */

View file

@ -30,11 +30,11 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: uart1.c,v 1.2 2010/07/06 13:39:34 maralvira Exp $
* $Id: uart1.c,v 1.3 2010/11/10 22:06:28 maralvira Exp $
*/
#include <mc1322x.h>
#include <types.h>
#include <stdint.h>
volatile char u1_tx_buf[1024];
volatile uint32_t u1_head, u1_tail;

View file

@ -30,11 +30,11 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: default_lowlevel.c,v 1.1 2010/06/10 14:49:31 maralvira Exp $
* $Id: default_lowlevel.c,v 1.2 2010/11/10 22:09:23 maralvira Exp $
*/
#include <mc1322x.h>
#include <types.h>
#include <stdint.h>
void default_vreg_init(void) {
volatile uint32_t i;

View file

@ -30,11 +30,11 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* for details.
*
* $Id: isr.c,v 1.4 2010/11/07 14:27:01 maralvira Exp $
* $Id: isr.c,v 1.5 2010/11/10 22:09:23 maralvira Exp $
*/
#include <mc1322x.h>
#include <types.h>
#include <stdint.h>
static void (*tmr_isr_funcs[4])(void) = {
tmr0_isr,