本文整理汇总了C++中print_symbol函数的典型用法代码示例。如果您正苦于以下问题:C++ print_symbol函数的具体用法?C++ print_symbol怎么用?C++ print_symbol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_symbol函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: print_date
void print_date(int yPos) {
for(int x = 0; x<128; x++) {
for(int y=yPos; y<yPos+18; y++ ){
reset_pixel(x,y);
}
}
/*int dayWidth = get_dayWidth();
int monthWidth = get_monthWidth();
int dateWidth = dayWidth + monthWidth + 6; //6=Punkt + Leerzeichen
int xPosDate = (127 - dateWidth) / 2 + 1;*/
int xPosDate = get_dateXPos();
if ((yPos == POS_DATE_STD) && (day==14) && (month==1)){
uint8_t roseSymb[90];
for(int i=0; i<90; i++){
roseSymb[i] = pgm_read_byte(&rose[0][i]);
}
print_symbol(16, 45, roseSymb, (127 - ROSE_WIDTH) / 2 + 1, POS_DATE_STD);
} else if ((yPos == POS_DATE_STD) && (day==4) && (month==7)) {
int spruch [11];
convertString("Alles Liebe", spruch);
int xSpruch = (127 - get_stringWidth(spruch, 11)) / 2 + 1;
print_ASCIIString(xSpruch, POS_DATE_STD, spruch, 11);
uint8_t herzSymb[32];
for(int i=0; i<32; i++){
herzSymb[i] = pgm_read_byte(&herz[0][i]);
}
print_symbol(16, 16, herzSymb, xSpruch - 16 - 4, POS_DATE_STD);
print_symbol(16, 16, herzSymb, xSpruch + get_stringWidth(spruch, 11) + 4, POS_DATE_STD);
} else {
print_day(xPosDate, yPos); //Tag
print_letter(alphaHeight, pgm_read_byte(&alphaWidth[54]), 54, xPosDate + get_dayWidth() + 1, yPos); //Punkt
print_month(xPosDate + get_dayWidth() + 6, yPos); //Monat ..+6=Punkt+Leerzeichen
}
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:35,代码来源:EADOGL128.c
示例2: dik_show_regs
void
dik_show_regs(struct pt_regs *regs, unsigned long *r9_15)
{
printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx %s\n",
regs->pc, regs->r26, regs->ps, print_tainted());
print_symbol("pc is at %s\n", regs->pc);
print_symbol("ra is at %s\n", regs->r26 );
printk("v0 = %016lx t0 = %016lx t1 = %016lx\n",
regs->r0, regs->r1, regs->r2);
printk("t2 = %016lx t3 = %016lx t4 = %016lx\n",
regs->r3, regs->r4, regs->r5);
printk("t5 = %016lx t6 = %016lx t7 = %016lx\n",
regs->r6, regs->r7, regs->r8);
if (r9_15) {
printk("s0 = %016lx s1 = %016lx s2 = %016lx\n",
r9_15[9], r9_15[10], r9_15[11]);
printk("s3 = %016lx s4 = %016lx s5 = %016lx\n",
r9_15[12], r9_15[13], r9_15[14]);
printk("s6 = %016lx\n", r9_15[15]);
}
printk("a0 = %016lx a1 = %016lx a2 = %016lx\n",
regs->r16, regs->r17, regs->r18);
printk("a3 = %016lx a4 = %016lx a5 = %016lx\n",
regs->r19, regs->r20, regs->r21);
printk("t8 = %016lx t9 = %016lx t10= %016lx\n",
regs->r22, regs->r23, regs->r24);
printk("t11= %016lx pv = %016lx at = %016lx\n",
regs->r25, regs->r27, regs->r28);
printk("gp = %016lx sp = %p\n", regs->gp, regs+1);
#if 0
__halt();
#endif
}
开发者ID:Lord-Devices,项目名称:cm_kernel_samsung_hlte,代码行数:35,代码来源:traps.c
示例3: __show_regs
void __show_regs(struct pt_regs *regs)
{
int i, top_reg;
u64 lr, sp;
if (compat_user_mode(regs)) {
lr = regs->compat_lr;
sp = regs->compat_sp;
top_reg = 12;
} else {
lr = regs->regs[30];
sp = regs->sp;
top_reg = 29;
}
show_regs_print_info(KERN_DEFAULT);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", lr);
printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
regs->pc, lr, regs->pstate);
printk("sp : %016llx\n", sp);
for (i = top_reg; i >= 0; i--) {
printk("x%-2d: %016llx ", i, regs->regs[i]);
if (i % 2 == 0)
printk("\n");
}
printk("\n");
}
开发者ID:julianjmaurer,项目名称:kernel,代码行数:28,代码来源:process.c
示例4: set_timeParameter
void set_timeParameter(int *timeParameter, int maxTime, bool timeType){ //timeParameter = {minute, hour, alarmMinute, alarmHour}
while(!btn_drehenc_pushed) {
if(rotary!=0) {
cli();
*timeParameter += rotary;
rotary = 0;
*timeParameter = *timeParameter % maxTime;
if(*timeParameter<0){
*timeParameter += maxTime;
}
seconds = 0;
sei();
for(int x = timeXPos; x < timeXPos + hourWidth + minuteWidth + 2*SPACE_TO_DOTS + TIMEDOT_WIDTH; x++){
for(int y = 0; y < timeYPos + BIG_NUMBER_HEIGHT; y++)
reset_pixel(x,y);
}
print_time(timeType);
if(maxTime == 60)
print_symbol(8,HERZ_KLEIN_WIDTH,herzKleinOffenSymb,timeXPos+hourWidth + 2*SPACE_TO_DOTS + TIMEDOT_WIDTH + minuteWidth/2-4, 2);
else
print_symbol(8,HERZ_KLEIN_WIDTH,herzKleinOffenSymb,timeXPos+hourWidth/2-4, 2);
update_LCD();
}
goodNight();
check_light();
}
cli();
btn_drehenc_pushed = false;
sei();
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:30,代码来源:EADOGL128.c
示例5: test_char_rnn
void test_char_rnn(char *cfgfile, char *weightfile, int num, char *seed, float temp, int rseed, char *token_file)
{
char **tokens = 0;
if(token_file){
size_t n;
tokens = read_tokens(token_file, &n);
}
srand(rseed);
char *base = basecfg(cfgfile);
fprintf(stderr, "%s\n", base);
network net = parse_network_cfg(cfgfile);
if(weightfile){
load_weights(&net, weightfile);
}
int inputs = get_network_input_size(net);
int i, j;
for(i = 0; i < net.n; ++i) net.layers[i].temperature = temp;
int c = 0;
int len = strlen(seed);
float *input = calloc(inputs, sizeof(float));
/*
fill_cpu(inputs, 0, input, 1);
for(i = 0; i < 10; ++i){
network_predict(net, input);
}
fill_cpu(inputs, 0, input, 1);
*/
for(i = 0; i < len-1; ++i){
c = seed[i];
input[c] = 1;
network_predict(net, input);
input[c] = 0;
print_symbol(c, tokens);
}
if(len) c = seed[len-1];
print_symbol(c, tokens);
for(i = 0; i < num; ++i){
input[c] = 1;
float *out = network_predict(net, input);
input[c] = 0;
for(j = 32; j < 127; ++j){
//printf("%d %c %f\n",j, j, out[j]);
}
for(j = 0; j < inputs; ++j){
if (out[j] < .0001) out[j] = 0;
}
c = sample_array(out, inputs);
print_symbol(c, tokens);
}
printf("\n");
}
开发者ID:AlessioTonioni,项目名称:darknet,代码行数:56,代码来源:rnn.c
示例6: print_symbol
void print_symbol(symbol *s){
/*
print_symbol() - diagnostic function to print a symbol. Not very good
*/
if (s->character != ROOT_NODE && s->character != INTERNAL_NODE ){
print_symbol(s->left);
print_symbol(s->right);
}
if (s!=NULL)
printf("%c\n",s->character);
}
开发者ID:whyzdev,项目名称:simple-semantic-desktop,代码行数:11,代码来源:encode.c
示例7: print_menuSelection
void print_menuSelection(int item, int numItems){
remove_menuSelection(old_selectedItem, numItems);
if(item<numItems){
print_symbol(16,16, herzSymb,2,2+item*15);
} else {
print_symbol(16,16, herzSymb, 92, 2+3*15);
}
old_selectedItem = item;
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:11,代码来源:EADOGL128.c
示例8: leave
void leave(void)
{
section *sec;
symbol *sym;
if(outfile) {
fclose(outfile);
if (errors)
remove(outname);
}
if(DEBUG) {
fprintf(stdout,"Sections:\n");
for(sec=first_section; sec; sec=sec->next)
print_section(stdout,sec);
fprintf(stdout,"Symbols:\n");
for(sym=first_symbol; sym; sym=sym->next) {
print_symbol(stdout,sym);
fprintf(stdout,"\n");
}
}
if(errors)
exit(EXIT_FAILURE);
else
exit(EXIT_SUCCESS);
}
开发者ID:ezrec,项目名称:vasm,代码行数:28,代码来源:vasm.c
示例9: show_trace
static void show_trace(unsigned long *stack, unsigned long *endstack)
{
unsigned long addr;
int i;
pr_debug("Call trace:");
i = 0;
while (stack + 1 <= endstack) {
addr = *stack++;
/*
* If the address is either in the text segment of the
* kernel, or in the region which contains vmalloc'ed
* memory, it *may* be the address of a calling
* routine; if so, print it so that someone tracing
* down the cause of the crash will be able to figure
* out the call path that was taken.
*/
if (__kernel_text_address(addr)) {
#ifndef CONFIG_KALLSYMS
if (i % 5 == 0)
pr_debug("\n ");
#endif
pr_debug(" [<%08lx>]", addr);
print_symbol(" %s\n", addr);
i++;
}
}
pr_debug("\n");
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:29,代码来源:traps.c
示例10: __report_bad_irq
static void
__report_bad_irq(unsigned int irq, struct irq_desc *desc,
irqreturn_t action_ret)
{
struct irqaction *action;
if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) {
printk(KERN_ERR "irq event %d: bogus return value %x\n",
irq, action_ret);
} else {
printk(KERN_ERR "irq %d: nobody cared (try booting with "
"the \"irqpoll\" option)\n", irq);
}
dump_stack();
printk(KERN_ERR "handlers:\n");
action = desc->action;
while (action) {
printk(KERN_ERR "[<%p>]", action->handler);
print_symbol(" (%s)",
(unsigned long)action->handler);
printk("\n");
action = action->next;
}
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:25,代码来源:spurious.c
示例11: print_trace_warning_symbol
static void
print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
{
printk(data);
print_symbol(msg, symbol);
printk("\n");
}
开发者ID:nosnilwar,项目名称:linux-raw-gov-2.6.38.8,代码行数:7,代码来源:dumpstack.c
示例12: show_regs
void show_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
printk("\n");
printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
print_symbol("EIP is at %s\n", regs->eip);
if (user_mode_vm(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s %.*s)\n",
regs->eflags, print_tainted(), system_utsname.release,
(int)strcspn(system_utsname.version, " "),
system_utsname.version);
printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax,regs->ebx,regs->ecx,regs->edx);
printk("ESI: %08lx EDI: %08lx EBP: %08lx",
regs->esi, regs->edi, regs->ebp);
printk(" DS: %04x ES: %04x\n",
0xffff & regs->xds,0xffff & regs->xes);
cr0 = read_cr0();
cr2 = read_cr2();
cr3 = read_cr3();
cr4 = read_cr4_safe();
printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4);
show_trace(NULL, regs, ®s->esp);
}
开发者ID:dduval,项目名称:kernel-rhel5,代码行数:29,代码来源:process-xen.c
示例13: do_initcalls
static void __init do_initcalls(void)
{
initcall_t *call;
int count = preempt_count();
for (call = &__initcall_start; call < &__initcall_end; call++) {
char *msg;
if (initcall_debug) {
printk(KERN_DEBUG "Calling initcall 0x%p", *call);
print_symbol(": %s()", (unsigned long) *call);
printk("\n");
}
(*call)();
msg = NULL;
if (preempt_count() != count) {
msg = "preemption imbalance";
preempt_count() = count;
}
if (irqs_disabled()) {
msg = "disabled interrupts";
local_irq_enable();
}
if (msg) {
printk("error in initcall at 0x%p: "
"returned with %s\n", *call, msg);
}
}
/* Make sure there is no pending stuff from the initcall sequence */
flush_scheduled_work();
}
开发者ID:OS2World,项目名称:DRV-LXAPI32,代码行数:34,代码来源:oi_main.c
示例14: print_snoozeLogo
void print_snoozeLogo(){
uint8_t snoozeSymb[9];
for(int i=0; i<9; i++){
snoozeSymb[i] = pgm_read_byte(&snoozePic[0][i]);
}
print_symbol(8,9, snoozeSymb,1,1);
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:7,代码来源:EADOGL128.c
示例15: print_alarmLogo
void print_alarmLogo() {
uint8_t weckerSymb[18];//72
for(int i=0; i<18; i++){//72
weckerSymb[i] = pgm_read_byte(¬e[0][i]);
}
print_symbol(16,9,weckerSymb,1,1);
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:7,代码来源:EADOGL128.c
示例16: set_year
void set_year(){
cli();
btn_drehenc_pushed = false;
sei();
while(!btn_drehenc_pushed){
if(rotary != 0){
year += rotary;
cli();
rotary = 0;
sei();
if (year < 0) {
year = 9999;
}
if(year > 9999){
year -= 10000;
}
for(int x = 0; x<128; x++){
for(int y = 30; y<40; y++)
reset_pixel(x,y);
}
for(int x = 0; x<90; x++){
for(int y = YPOS_YEAR; y<YPOS_YEAR + 17; y++){
reset_pixel(x,y);
}
}
print_year();
print_symbol(8, HERZ_KLEIN_WIDTH, herzKleinOffenSymb, get_yearXPos() + get_yearWidth() / 2 - 4, YPOS_YEAR - 10);
update_LCD();
}
goodNight();
check_light();
}
goodNight();
check_light();
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:35,代码来源:EADOGL128.c
示例17: set_month
void set_month(){
cli();
btn_drehenc_pushed = false;
sei();
while(!btn_drehenc_pushed){
if(rotary != 0){
month += rotary;
cli();
rotary = 0;
sei();
month = month % 12;
if (month < 0) {
month += 12;
}
if(day > pgm_read_byte(&daysPerMonth[month])){
day = pgm_read_byte(&daysPerMonth[month]);
}
for(int x = 0; x<128; x++){
for(int y = 0; y<10; y++)
reset_pixel(x,y);
}
print_date(POS_DATE_SET);
print_symbol(8, HERZ_KLEIN_WIDTH, herzKleinOffenSymb, get_dateXPos() + get_dayWidth() + get_monthWidth() / 2 - 4, POS_DATE_SET - 10);
update_LCD();
}
goodNight();
check_light();
}
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:30,代码来源:EADOGL128.c
示例18: print_menuItems
void print_menuItems(char item1[], char item2[], char item3[], char item4[]){
clear_pixelMatrix();
int xPosItem = 20;
int yPosItem = 3;
//Item1
int item1_ASCII [strlen(item1)];
convertString(item1, item1_ASCII);
print_ASCIIString(xPosItem, yPosItem, item1_ASCII, sizeof(item1_ASCII)/sizeof(item1_ASCII[0]));
yPosItem += 15;
//Item2
int item2_ASCII [strlen(item2)];
convertString(item2, item2_ASCII);
print_ASCIIString(xPosItem, yPosItem, item2_ASCII, sizeof(item2_ASCII)/sizeof(item2_ASCII[0]));
yPosItem += 15;
//Item3
int item3_ASCII [strlen(item3)];
convertString(item3, item3_ASCII);
print_ASCIIString(xPosItem, yPosItem, item3_ASCII, sizeof(item3_ASCII)/sizeof(item3_ASCII[0]));
yPosItem += 15;
//Item4
int item4_ASCII [strlen(item4)];
convertString(item4, item4_ASCII);
print_ASCIIString(xPosItem, yPosItem, item4_ASCII, sizeof(item4_ASCII)/sizeof(item4_ASCII[0]));
//Haken
print_symbol(16,17, hakenSymb,108,46);
}
开发者ID:MalteBastelt,项目名称:Wecker,代码行数:31,代码来源:EADOGL128.c
示例19: _do_initcalls
static void __init _do_initcalls(int count,initcall_t* strt,initcall_t* end)
{
initcall_t *call;
for(call=strt;call<end;call++)
{
char *msg;
if (initcall_debug)
{
printk(KERN_DEBUG "Calling initcall 0x%p", *call);
print_symbol(": %s()", (unsigned long) *call);
printk("\n");
}
(*call)();
msg=NULL;
if(preempt_count()!=count)
{
msg="preemption imbalance";
preempt_count()=count;
}
if(irqs_disabled())
{
msg="disabled interrupts";
local_irq_enable();
}
if(msg)
{
printk("error in initcall at 0x%p: "
"returned with %s\n",*call, msg);
}
}
}
开发者ID:OS2World,项目名称:DRV-LXAPI32,代码行数:31,代码来源:oi_main.c
示例20: print_storage
/// Print all symbols stored in the storage where the symbol data
/// is shown in bytes.
/// @param out The output stream to print to
void print_storage(std::ostream& out) const
{
for(uint32_t i = 0; i < SuperCoder::symbols(); ++i)
{
print_symbol(out, i);
}
}
开发者ID:placrosse,项目名称:kodo,代码行数:10,代码来源:trace_symbol_storage.hpp
注:本文中的print_symbol函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论