Changeset c47e1a8 in mainline for uspace/app/sbi/src/builtin.h
- Timestamp:
- 2010-05-21T07:50:04Z (16 years ago)
- 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. - File:
-
- 1 moved
-
uspace/app/sbi/src/builtin.h (moved) (moved from boot/arch/arm32/loader/print/print.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/builtin.h
rcf8cc36 rc47e1a8 1 1 /* 2 * Copyright (c) 2007 Michal Kebrt 3 * Copyright (c) 2009 Vineeth Pillai 2 * Copyright (c) 2010 Jiri Svoboda 4 3 * All rights reserved. 5 4 * … … 28 27 */ 29 28 29 #ifndef BUILTIN_H_ 30 #define BUILTIN_H_ 30 31 31 /** @addtogroup arm32boot 32 * @{ 33 */ 34 /** @file 35 * @brief bootloader output logic 36 */ 32 #include "mytypes.h" 37 33 34 void builtin_declare(stree_program_t *program); 35 void builtin_bind(builtin_t *bi); 36 void builtin_code_snippet(builtin_t *bi, const char *snippet); 38 37 39 #include <printf.h> 38 stree_csi_t *builtin_get_gf_class(builtin_t *builtin); 39 void builtin_run_proc(run_t *run, stree_proc_t *proc); 40 40 41 rdata_var_t *builtin_get_self_mbr_var(run_t *run, const char *mbr_name); 41 42 42 /** Address where characters to be printed are expected. */ 43 #ifdef MACHINE_testarm 44 #define PUTC_ADDRESS 0x10000000 43 stree_symbol_t *builtin_declare_fun(stree_csi_t *csi, const char *name); 44 void builtin_fun_add_arg(stree_symbol_t *fun_sym, const char *name); 45 46 stree_symbol_t *builtin_find_lvl0(builtin_t *bi, const char *sym_name); 47 stree_symbol_t *builtin_find_lvl1(builtin_t *bi, const char *csi_name, 48 const char *sym_name); 49 50 void builtin_fun_bind(builtin_t *bi, const char *csi_name, 51 const char *sym_name, builtin_proc_t bproc); 52 45 53 #endif 46 47 #ifdef MACHINE_integratorcp48 #define PUTC_ADDRESS 0x1600000049 #endif50 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.
