void output_wrapper_start(parserinfo_cut_t *pinfo) { open_stdout(); if( pinfo ) { puts_stdout(get_headwrap()); puts_stdout(get_open_root()); putc_stdout('\n'); } }
static inline void app_setup_dbg() { BAUD baudrate; pin_enable(DBG_CONSOLE_TX_PIN, STM32_GPIO_MODE_OUTPUT_AF_PUSH_PULL_50MHZ, false); uart_open(DBG_CONSOLE, UART_MODE_STREAM | UART_TX_STREAM); baudrate.baud = DBG_CONSOLE_BAUD; baudrate.data_bits = 8; baudrate.parity = 'N'; baudrate.stop_bits= 1; uart_set_baudrate(DBG_CONSOLE, &baudrate); uart_setup_printk(DBG_CONSOLE); uart_setup_stdout(DBG_CONSOLE); open_stdout(); }
void vfss() { IPC ipc; VFSS_TYPE vfss; #if (VFS_DEBUG_INFO) || (VFS_DEBUG_ERRORS) open_stdout(); #endif //(VFS_DEBUG_INFO) || (VFS_DEBUG_ERRORS) vfss_init(&vfss); for (;;) { ipc_read(&ipc); vfss_request(&vfss, &ipc); ipc_write(&ipc); } }
int main(int argc, char **argv) { signed char op; parserinfo_ls_t pinfo; struct option longopts[] = { { "version", 0, NULL, LS_VERSION }, { "help", 0, NULL, LS_HELP }, { "attributes", 0, NULL, LS_ATTRIBUTES }, { 0 } }; progname = "xml-ls"; inputfile = ""; inputline = 0; if( create_parserinfo_ls(&pinfo) ) { while( (op = getopt_long(argc, argv, "a", longopts, NULL)) > -1 ) { set_option_ls(op, optarg, &pinfo); } init_signal_handling(SIGNALS_DEFAULT); init_file_handling(); open_stdout(); puts_stdout(get_headwrap()); puts_stdout(get_open_root()); stdparse(MAXFILES, argv + optind, (stdparserinfo_t *)&pinfo); putc_stdout('\n'); puts_stdout(get_close_root()); puts_stdout(get_footwrap()); close_stdout(); exit_file_handling(); exit_signal_handling(); free_parserinfo_ls(&pinfo); } return EXIT_SUCCESS; }
void loras_main() { IPC ipc; LORA lora; #if (LORA_DEBUG) open_stdout(); #endif //LORA_DEBUG init(&lora); for (;;) { ipc_read(&ipc); switch (HAL_GROUP(ipc.cmd)) { case HAL_LORA: loras_request(&lora, &ipc); break; default: error(ERROR_NOT_SUPPORTED); break; } ipc_write(&ipc); } }