Changeset c47e1a8 in mainline for uspace/app/sbi/src/builtin.h


Ignore:
Timestamp:
2010-05-21T07:50:04Z (16 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ee2b
Parents:
cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes (rev. 451)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/builtin.h

    rcf8cc36 rc47e1a8  
    11/*
    2  * Copyright (c) 2007 Michal Kebrt
    3  * Copyright (c) 2009 Vineeth Pillai
     2 * Copyright (c) 2010 Jiri Svoboda
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
     29#ifndef BUILTIN_H_
     30#define BUILTIN_H_
    3031
    31 /** @addtogroup arm32boot
    32  * @{
    33  */
    34 /** @file
    35  *  @brief bootloader output logic
    36  */
     32#include "mytypes.h"
    3733
     34void builtin_declare(stree_program_t *program);
     35void builtin_bind(builtin_t *bi);
     36void builtin_code_snippet(builtin_t *bi, const char *snippet);
    3837
    39 #include <printf.h>
     38stree_csi_t *builtin_get_gf_class(builtin_t *builtin);
     39void builtin_run_proc(run_t *run, stree_proc_t *proc);
    4040
     41rdata_var_t *builtin_get_self_mbr_var(run_t *run, const char *mbr_name);
    4142
    42 /** Address where characters to be printed are expected. */
    43 #ifdef MACHINE_testarm
    44         #define PUTC_ADDRESS  0x10000000
     43stree_symbol_t *builtin_declare_fun(stree_csi_t *csi, const char *name);
     44void builtin_fun_add_arg(stree_symbol_t *fun_sym, const char *name);
     45
     46stree_symbol_t *builtin_find_lvl0(builtin_t *bi, const char *sym_name);
     47stree_symbol_t *builtin_find_lvl1(builtin_t *bi, const char *csi_name,
     48    const char *sym_name);
     49
     50void builtin_fun_bind(builtin_t *bi, const char *csi_name,
     51    const char *sym_name, builtin_proc_t bproc);
     52
    4553#endif
    46 
    47 #ifdef MACHINE_integratorcp
    48         #define PUTC_ADDRESS  0x16000000
    49 #endif
    50 
    51 
    52 
    53 /** Prints a character to the console.
    54  *
    55  * @param ch Character to be printed.
    56  */
    57 static void putc(char ch)
    58 {
    59         if (ch == '\n')
    60                 *((volatile char *) PUTC_ADDRESS) = '\r';
    61         *((volatile char *) PUTC_ADDRESS) = ch;
    62 }
    63 
    64 
    65 /** Prints a string to the console.
    66  *
    67  * @param str String to be printed.
    68  * @param len Number of characters to be printed.
    69  */
    70 void write(const char *str, const int len)
    71 {
    72         int i;
    73         for (i = 0; i < len; ++i) {
    74                 putc(str[i]);
    75         }
    76 }
    77 
    78 /** @}
    79  */
    80 
Note: See TracChangeset for help on using the changeset viewer.