本文整理汇总了C++中console_print函数的典型用法代码示例。如果您正苦于以下问题:C++ console_print函数的具体用法?C++ console_print怎么用?C++ console_print使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了console_print函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_module
/* Initialize the LKM */
int init_module()
{
console_print("Hello, world - this is the kernel speaking\n");
/* More normal is printk(), but there's less that can go wrong with
console_print(), so let's start simple.
*/
/* If we return a non zero value, it means that
* init_module failed and the LKM can't be loaded
*/
return 0;
}
示例2: contact_added_callback
bool contact_added_callback( btManifoldPoint &btmanifoldpoint,
const btCollisionObject *btcollisionobject0,
int part_0, int index_0,
const btCollisionObject *btcollisionobject1,
int part_1, int index_1 ) {
OBJMESH *objmesh0 = ( OBJMESH * )( ( btRigidBody * )btcollisionobject0 )->getUserPointer();
OBJMESH *objmesh1 = ( OBJMESH * )( ( btRigidBody * )btcollisionobject1 )->getUserPointer();
console_print("Object #0: %s\n", objmesh0->name );
console_print("Point #0: %.3f %.3f %.3f\n",
btmanifoldpoint.m_positionWorldOnA.x(),
btmanifoldpoint.m_positionWorldOnA.y(),
btmanifoldpoint.m_positionWorldOnA.z() );
console_print("Object #1: %s\n", objmesh1->name );
console_print("Point #1: %.3f %.3f %.3f\n",
btmanifoldpoint.m_positionWorldOnB.x(),
btmanifoldpoint.m_positionWorldOnB.y(),
btmanifoldpoint.m_positionWorldOnB.z() );
console_print("Normal : %.3f %.3f %.3f\n",
btmanifoldpoint.m_normalWorldOnB.x(),
btmanifoldpoint.m_normalWorldOnB.y(),
btmanifoldpoint.m_normalWorldOnB.z() );
console_print( "%d\n\n", get_milli_time() );
return false;
}
示例3: set_rx2_rf_gain
/**************************************************************************//***
* @brief Sets the RX2 RF gain.
*
* @return None.
*******************************************************************************/
void set_rx2_rf_gain(double* param, char param_no) // "rx2_rf_gain=" command
{
int32_t gain_db;
if(param_no >= 1)
{
gain_db = param[0];
ad9361_set_rx_rf_gain (ad9361_phy, 1, gain_db);
console_print("rx2_rf_gain=%d\n", gain_db);
}
else
show_invalid_param_message(1);
}
示例4: ftp_session_open_cwd
/*! open current working directory for ftp session
*
* @param[in] session ftp session
*
* @return -1 for failure
*/
static int
ftp_session_open_cwd(ftp_session_t *session)
{
/* open current working directory */
session->dp = opendir(session->cwd);
if(session->dp == NULL)
{
console_print(RED "opendir '%s': %d %s\n" RESET, session->cwd, errno, strerror(errno));
return -1;
}
return 0;
}
示例5: fault_gp
/**
* Fault Handler: General Protection Fault
*
* Kernel: Panic
* User: Terminate Process
*/
void fault_gp(cpu_int_state_t *state) {
// Is in kernel?
if (state->cs == 0x8) {
console_print("PANIC: General Protection Fault in kernel at ");
console_print_hex(state->rip);
console_print(" (error code: ");
console_print_hex(state->error_code);
console_print(").\n");
while (1);
}
// TODO: Remove this debug warning
DEBUG("General Protection Fault at ");
DEBUG_HEX(state->rip);
DEBUG(" (error code: ");
DEBUG_HEX(state->error_code);
DEBUG(").\n");
// Terminate process
process_terminate(process_current->pid);
thread_switch(scheduler_next(), state);
}
示例6: set_dds_tx2_tone2_freq
/**************************************************************************//***
* @brief Sets the DDS TX2 Tone 2 frequency [Hz].
*
* @return None.
*******************************************************************************/
void set_dds_tx2_tone2_freq(double* param, char param_no) // dds_tx2_tone2_freq=
{
uint32_t freq = (uint32_t)param[0];
if(param_no >= 1)
{
dds_set_frequency(DDS_CHAN_TX2_I_F2, freq);
dds_set_frequency(DDS_CHAN_TX2_Q_F2, freq);
console_print("dds_tx2_tone2_freq=%d\n", freq);
}
else
show_invalid_param_message(1);
}
示例7: set_rx_lo_freq
/**************************************************************************//***
* @brief Sets the RX LO frequency [MHz].
*
* @return None.
*******************************************************************************/
void set_rx_lo_freq(double* param, char param_no) // "rx_lo_freq=" command
{
uint64_t lo_freq_hz;
if(param_no >= 1)
{
lo_freq_hz = param[0];
lo_freq_hz *= 1000000;
ad9361_set_rx_lo_freq(ad9361_phy, lo_freq_hz);
lo_freq_hz /= 1000000;
console_print("rx_lo_freq=%d\n", (uint32_t)lo_freq_hz);
}
}
示例8: set_dds_tx2_tone2_scale
/**************************************************************************//***
* @brief Sets the DDS TX2 Tone 2 scale.
*
* @return None.
*******************************************************************************/
void set_dds_tx2_tone2_scale(double* param, char param_no) // dds_tx2_tone2_scale=
{
uint32_t scale = (uint32_t)param[0];
if(param_no >= 1)
{
dds_set_scale(DDS_CHAN_TX2_I_F2, scale);
dds_set_scale(DDS_CHAN_TX2_Q_F2, scale);
console_print("dds_tx2_tone2_scale=%d\n", scale);
}
else
show_invalid_param_message(1);
}
示例9: set_rx_rf_bandwidth
/**************************************************************************//***
* @brief Sets the RX RF bandwidth [Hz].
*
* @return None.
*******************************************************************************/
void set_rx_rf_bandwidth(double* param, char param_no) // "rx_rf_bandwidth=" command
{
uint32_t bandwidth_hz;
if(param_no >= 1)
{
bandwidth_hz = param[0];
ad9361_set_rx_rf_bandwidth(ad9361_phy, bandwidth_hz);
console_print("rx_rf_bandwidth=%d\n", bandwidth_hz);
}
else
show_invalid_param_message(1);
}
示例10: set_rx_fir_en
/**************************************************************************//***
* @brief Sets the RX FIR state.
*
* @return None.
*******************************************************************************/
void set_rx_fir_en(double* param, char param_no) // "rx_fir_en=" command
{
uint8_t en_dis;
if(param_no >= 1)
{
en_dis = param[0];
ad9361_set_rx_fir_en_dis(ad9361_phy, en_dis);
console_print("rx_fir_en=%d\n", en_dis);
}
else
show_invalid_param_message(1);
}
示例11: ftp_exit
/*! deinitialize ftp subsystem */
void
ftp_exit(void)
{
#ifdef _3DS
Result ret;
#endif
/* clean up all sessions */
while(sessions != NULL)
ftp_session_destroy(sessions);
/* stop listening for new clients */
if(listenfd >= 0)
ftp_closesocket(listenfd, 0);
#ifdef _3DS
/* deinitialize SOC service */
ret = SOC_Shutdown();
if(ret != 0)
console_print(RED "SOC_Shutdown: 0x%08X\n" RESET, (unsigned int)ret);
free(SOC_buffer);
#ifdef ENABLE_LOGGING
/* close log file */
if(fclose(stderr) != 0)
console_print(RED "fclose: 0x%08X\n" RESET, errno);
/* deinitialize sdmc_dev */
ret = sdmcExit();
if(ret != 0)
console_print(RED "sdmcExit: 0x%08X\n" RESET, (unsigned int)ret);
#endif
/* deinitialize FS service */
ret = fsExit();
if(ret != 0)
console_print(RED "fsExit: 0x%08X\n" RESET, (unsigned int)ret);
#endif
}
示例12: set_rx2_gc_mode
/**************************************************************************//***
* @brief Sets the RX2 GC mode.
*
* @return None.
*******************************************************************************/
void set_rx2_gc_mode(double* param, char param_no) // "rx2_gc_mode=" command
{
uint8_t gc_mode;
if(param_no >= 1)
{
gc_mode = param[0];
ad9361_set_rx_gain_control_mode(ad9361_phy, 1, gc_mode);
console_print("rx2_gc_mode=%d\n", gc_mode);
}
else
show_invalid_param_message(1);
}
示例13: bootstrap
void bootstrap() {
DPRINT("Device booted at time: %d\n", timer_get_counter_value());
#ifndef FRAMEWORK_LOG_BINARY
console_print("\r\nPER TEST - commands:\r\n");
console_print(" CHANfffriii channel settings:\r\n");
console_print(" fff frequency : 433, 868, 915\r\n");
console_print(" r rate : L(ow) N(ormal) H(igh)\r\n");
console_print(" iii center_freq_index\r\n");
console_print(" TRANsss transmit a packet every sss seconds.\r\n");
console_print(" RECV receive packets\r\n");
console_print(" RSET reset module\r\n");
#endif
id = hw_get_unique_id();
hw_radio_init(&alloc_new_packet, &release_packet);
rx_cfg.channel_id = current_channel_id;
tx_cfg.channel_id = current_channel_id;
ubutton_register_callback(0, &userbutton_callback);
ubutton_register_callback(1, &userbutton_callback);
fifo_init(&uart_rx_fifo, uart_rx_buffer, sizeof(uart_rx_buffer));
console_set_rx_interrupt_callback(&uart_rx_cb);
console_rx_interrupt_enable();
sched_register_task(&start_rx);
sched_register_task(&transmit_packet);
sched_register_task(&start);
sched_register_task(&process_uart_rx_fifo);
current_state = STATE_CONFIG_DIRECTION;
sched_post_task(&start);
sched_post_task(&process_uart_rx_fifo);
#ifdef PLATFORM_EFM32GG_STK3700
#else
char str[20];
channel_id_to_string(¤t_channel_id, str, sizeof(str));
lcd_write_line(6, str);
#endif
timer_post_task(&transmit_packet, TIMER_TICKS_PER_SEC * 1);
}
示例14: task_timer
static void task_timer (const char _name [], void *_p_arg)
{
queue_handle_t queue = (queue_handle_t)_p_arg;
timer_handle_t handle;
for (;;) {
if (0 != queue_message_receive (queue, 0, &handle)) {
console_print ("Error: task \"%s\" cannot recieve message", _name);
(void) task_suspend (task_self ());
}
handle->callback_(handle, handle->arg_);
}
}
示例15: con_tune_param
static void con_tune_param(void *result, void *user_data, int cid)
{
const char *param_name = console_arg_string(result, 0);
float new_value = console_arg_float(result, 1);
if(tuning.set(param_name, new_value))
{
dbg_msg("tuning", "%s changed to %.2f", param_name, new_value);
send_tuning_params(-1);
}
else
console_print("No such tuning parameter");
}