-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d10ebab
commit c889090
Showing
5 changed files
with
94 additions
and
17 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#ifndef _CONFIG_H | ||
#define _CONFIG_H | ||
|
||
#define NB_PROCS 2 | ||
#define NB_PROCS 1 | ||
#define NB_MAXTASKS 1 | ||
#define NO_HARD_CC 1 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
#include "stdio.h" | ||
|
||
#define NPIXEL 256 | ||
#define NLINE 256 | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// main function | ||
/////////////////////////////////////////////////////////////////////////////// | ||
__attribute__ ((constructor)) void main() | ||
{ | ||
unsigned char BUF[NPIXEL*NLINE]; | ||
unsigned int line; | ||
unsigned int pixel; | ||
unsigned int step; | ||
|
||
/* --------------------------- LOOP ------------------------------------- */ | ||
for(step = 1 ; step < 6 ; step++) | ||
{ | ||
/* ---- BUILD PICTURE (STEP) ---- */ | ||
for(pixel = 0 ; pixel < NPIXEL ; pixel++) | ||
{ | ||
for(line = 0 ; line < NLINE ; line++) | ||
{ | ||
if( ( (pixel>>step & 0x1) && !(line>>step & 0x1)) || | ||
(!(pixel>>step & 0x1) && (line>>step & 0x1)) ) BUF[NPIXEL*line + pixel] = 0xFF; | ||
else BUF[NPIXEL*line + pixel] = 0x0; | ||
} | ||
} | ||
tty_printf(" - build %d OK at cycle %d\n", step, proctime()); | ||
|
||
/* ---- DISPLAY PICTURE (STEP - 1) ---- */ | ||
if(fb_sync_write(0, BUF, NLINE*NPIXEL) != 0) | ||
{ | ||
tty_printf("\n!!! error in fb_syn_write syscall !!!\n"); | ||
exit(); | ||
} | ||
tty_printf(" - display %d OK at cycle %d\n", step, proctime()); | ||
} | ||
tty_printf("\nFin du programme au cycle = %d\n\n", proctime()); | ||
exit(); | ||
} // end main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters