91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 9.95MB
    文件類型: .bz2
    金幣: 1
    下載: 0 次
    發布日期: 2023-10-05
  • 語言: 其他
  • 標簽: uboot??tq3358??tq335x??

資源簡介

基于TQ3358的u-boot移植,支持SD啟動。

資源截圖

代碼片段和文件信息

/*
?*?(C)?Copyright?2007?Semihalf
?*
?*?Written?by:?Rafal?Jaworowski?
?*
?*?SPDX-License-Identifier: GPL-2.0+
?*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“api_private.h“

#define?DEBUG
#undef?DEBUG

/*****************************************************************************
?*
?*?This?is?the?API?core.
?*
?*?API_?functions?are?part?of?U-Boot?code?and?constitute?the?lowest?level
?*?calls:
?*
?*??-?they?know?what?values?they?need?as?arguments
?*??-?their?direct?return?value?pertains?to?the?API_?“shell“?itself?(0?on
?*????success?some?error?code?otherwise)
?*??-?if?the?call?returns?a?value?it?is?buried?within?arguments
?*
?****************************************************************************/

#ifdef?DEBUG
#define?debugf(fmt?args...)?do?{?printf(“%s():?“?__func__);?printf(fmt?##args);?}?while?(0)
#else
#define?debugf(fmt?args...)
#endif

typedef int?(*cfp_t)(va_list?argp);

static?int?calls_no;

/*
?*?pseudo?signature:
?*
?*?int?API_getc(int?*c)
?*/
static?int?API_getc(va_list?ap)
{
int?*c;

if?((c?=?(int?*)va_arg(ap?u_int32_t))?==?NULL)
return?API_EINVAL;

*c?=?getc();
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_tstc(int?*c)
?*/
static?int?API_tstc(va_list?ap)
{
int?*t;

if?((t?=?(int?*)va_arg(ap?u_int32_t))?==?NULL)
return?API_EINVAL;

*t?=?tstc();
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_putc(char?*ch)
?*/
static?int?API_putc(va_list?ap)
{
char?*c;

if?((c?=?(char?*)va_arg(ap?u_int32_t))?==?NULL)
return?API_EINVAL;

putc(*c);
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_puts(char?**s)
?*/
static?int?API_puts(va_list?ap)
{
char?*s;

if?((s?=?(char?*)va_arg(ap?u_int32_t))?==?NULL)
return?API_EINVAL;

puts(s);
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_reset(void)
?*/
static?int?API_reset(va_list?ap)
{
do_reset(NULL?0?0?NULL);

/*?NOT?REACHED?*/
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_get_sys_info(struct?sys_info?*si)
?*
?*?fill?out?the?sys_info?struct?containing?selected?parameters?about?the
?*?machine
?*/
static?int?API_get_sys_info(va_list?ap)
{
struct?sys_info?*si;

si?=?(struct?sys_info?*)va_arg(ap?u_int32_t);
if?(si?==?NULL)
return?API_ENOMEM;

return?(platform_sys_info(si))???0?:?API_ENODEV;
}

/*
?*?pseudo?signature:
?*
?*?int?API_udelay(unsigned?long?*udelay)
?*/
static?int?API_udelay(va_list?ap)
{
unsigned?long?*d;

if?((d?=?(unsigned?long?*)va_arg(ap?u_int32_t))?==?NULL)
return?API_EINVAL;

udelay(*d);
return?0;
}

/*
?*?pseudo?signature:
?*
?*?int?API_get_timer(unsigned?long?*current?unsigned?long?*base)
?*/
static?int?API_get_timer(va_list?ap)
{
unsigned?long?*base?*cur;

cur?=?(unsigned?long?*)va_arg(ap?u_int32_t);
if?(cur?==?NULL)
return?API_EINVAL;

base?=?(unsigned?long?*)va_arg(ap?u_int32_t);
if?(base?==?NULL)
return?API_EINVAL;

*cur?=?get_timer(*base);
return?0;
}


/****

評論

共有 條評論