int main () { while (TRUE) { puttime (&timeloc); } return 0; }
alt_u32 show (void* context) { /* This function will be called once/second */ if (run) tick (&timeloc); puttime (&timeloc); IOWR_ALTERA_AVALON_PIO_DATA(DE2_PIO_REDLED18_BASE,timeloc); puthex(timeloc); return alt_ticks_per_second(); }
static void putlf(t_list *lst, t_max buff, t_opt opt) { ft_putchar(((t_ls*)(lst->content))->type); ft_putendchar(((t_ls*)(lst->content))->rights, ' '); ft_putstr_right(ft_itoa(((t_ls*)(lst->content))->nb_hlink), buff.mx_hl); ft_putchar(' '); if (!opt.g) { ft_putstr_left(((t_ls*)(lst->content))->u_name, buff.mx_un); ft_putstr(" "); } ft_putstr_left(((t_ls*)(lst->content))->g_name, buff.mx_gn); ft_putstr(" "); ft_putstr_right(ft_itoa(((t_ls*)(lst->content))->size), buff.mx_sz); ft_putchar(' '); puttime(lst, opt); ft_putstr(((t_ls*)(lst->content))->name); print_link(((t_ls*)(lst->content))->link); }