geogeo> Il n'a jamais parlé d'écrire un word.
Il parle d'un mot de 8 bits (un octet).
#define OPTIZE_ROM_CALL
#include <tigcclib.h>
void _main(void)
{
INT_HANDLER save_int_4;
save_int_4 = GetIntVec (AUTO_INT_4);
SetIntVec (AUTO_INT_4, DUMMY_HANDLER);
short key=0;
OSLinkOpen();
while(key!=264)
{
key=ngetchx();
if(key==KEY_F1)
{
pokeIO_bset (0x60000E, 0);
pokeIO_bset (0x60000E, 1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"0 0",A_REPLACE);
}
if(key==KEY_F2)
{
pokeIO_bclr (0x60000E, 0);
pokeIO_bclr (0x60000E, 1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"1 1",A_REPLACE);
}
if(key==KEY_F3)
{
pokeIO_bclr (0x60000E, 0);
pokeIO_bset (0x60000E, 1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"1 0",A_REPLACE);
}
if(key==KEY_F4)
{
pokeIO_bset (0x60000E, 0);
pokeIO_bclr (0x60000E, 1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"0 1",A_REPLACE);
}
}
while(key!=13)
{
char af[10];
key=peekIO_bit(0x60000E, 0);
sprintf(af,"%d",key);
DrawStr(10,10,"0 1",A_REPLACE);
key=peekIO_bit(0x60000E, 1);
sprintf(af,"%d",key);
DrawStr(30,10,"0 1",A_REPLACE);
key=ngetchx();
}
OSLinkClose();
SetIntVec (AUTO_INT_4, save_int_4);
OSLinkReset();
}
void _main (void)
{
char buffer [10]={};
//Phase d'initialisation du port I/O
pokeIO ($60000C,0);
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C,40);
while (!_keytest (RR_ESC))
{
if (_keytest (RR_F1))
{
pokeIO_bset (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F2))
{
pokeIO_clr (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F3))
{
pokeIO_bset (0x60000E,0);
pokeIO_bclr (0x60000E,1);
}
else if (_keytest (RR_F4))
{
pokeIO_bset (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
//Affiche état du port I/O
if (_keytest (RR_F1) || _keytest (RR_F2) || _keytest (RR_F3) || _keytest (RR_F4))
sprintf(buffer,"%d - %d",peekIO_bit (0x60000E,0),peekIO_bit (0x60000E,1));
}
//Remise à état normal du port I/O
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C, 0x8D)
}#define OPTIZE_ROM_CALL
#include <tigcclib.h>
void _main (void)
{
INT_HANDLER save_int_4;
save_int_4 = GetIntVec (AUTO_INT_4);
SetIntVec (AUTO_INT_4, DUMMY_HANDLER);
INT_HANDLER save_int_1;
save_int_1 = GetIntVec (AUTO_INT_1);
SetIntVec (AUTO_INT_1, DUMMY_HANDLER);
pokeIO(0x60000C,0);
pokeIO_bclr(0x60000E,0);
pokeIO_bclr(0x60000E,1);
pokeIO(0x60000C,40);
while (!_keytest (RR_ESC))
{
if (_keytest (RR_F1))
{
while(_keytest(RR_F1));
pokeIO_bset (0x60000E,0);
pokeIO_bset (0x60000E,1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"0 0",A_REPLACE);
}
else if (_keytest (RR_F2))
{
while(_keytest(RR_F2));
pokeIO_bclr (0x60000E,0);
pokeIO_bset (0x60000E,1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"1 0",A_REPLACE);
}
else if (_keytest (RR_F3))
{
while(_keytest(RR_F3));
pokeIO_bset (0x60000E,0);
pokeIO_bclr (0x60000E,1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"0 1",A_REPLACE);
}
else if (_keytest (RR_F4))
{
while(_keytest(RR_F4));
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
DrawStr(LCD_WIDTH/2-35,LCD_HEIGHT/2,"1 1",A_REPLACE);
}
}
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C, 0x8D);
SetIntVec (AUTO_INT_4, save_int_4);
SetIntVec (AUTO_INT_1, save_int_1);
}#define OPTIZE_ROM_CALL
#include <tigcclib.h>
void _main (void)
{
INT_HANDLER save_int_1;
save_int_1 = GetIntVec (AUTO_INT_1);
SetIntVec (AUTO_INT_1, DUMMY_HANDLER);
INT_HANDLER save_int_5;
save_int_5 = GetIntVec (AUTO_INT_5);
SetIntVec (AUTO_INT_5, DUMMY_HANDLER);
char buffer [10]={};
//Phase d'initialisation du port I/O
pokeIO (0x60000C,0);
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C,40);
while (!_keytest (RR_ESC))
{
if (_keytest (RR_F1))
{
pokeIO_bset (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F2))
{
pokeIO_bclr (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F3))
{
pokeIO_bset (0x60000E,0);
pokeIO_bclr (0x60000E,1);
}
else if (_keytest (RR_F4))
{
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
}
//Affiche état du port I/O
if (_keytest (RR_F1) || _keytest (RR_F2) || _keytest (RR_F3) || _keytest (RR_F4))
sprintf(buffer,"%d - %d",peekIO_bit (0x60000E,0),peekIO_bit (0x60000E,1));
}
//Remise à état normal du port I/O
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C, 0x8D);
SetIntVec (AUTO_INT_1, save_int_1);
SetIntVec (AUTO_INT_1, save_int_5);
}
#define OPTIZE_ROM_CALL
#include <tigcclib.h>
void _main (void)
{
INT_HANDLER save_int_1;
save_int_1 = GetIntVec (AUTO_INT_1);
SetIntVec (AUTO_INT_1, DUMMY_HANDLER);
INT_HANDLER save_int_5;
save_int_5 = GetIntVec (AUTO_INT_5);
SetIntVec (AUTO_INT_5, DUMMY_HANDLER);
//Phase d'initialisation du port I/O
pokeIO (0x60000C,0);
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C,40);
while (!_keytest (RR_ESC))
{
if (_keytest (RR_F1))
{
while(_keytest(RR_F1));
pokeIO_bset (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F2))
{
while(_keytest(RR_F2));
pokeIO_bclr (0x60000E,0);
pokeIO_bset (0x60000E,1);
}
else if (_keytest (RR_F3))
{
while(_keytest(RR_F3));
pokeIO_bset (0x60000E,0);
pokeIO_bclr (0x60000E,1);
}
else if (_keytest (RR_F4))
{
while(_keytest(RR_F4));
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
}
}
//Remise à état normal du port I/O
pokeIO_bclr (0x60000E,0);
pokeIO_bclr (0x60000E,1);
pokeIO (0x60000C, 0x8D);
SetIntVec (AUTO_INT_1, save_int_1);
SetIntVec (AUTO_INT_5, save_int_5);
}


geogeo :Et alors ? Ce n'est pas parce que ça fonctionne bien sur ta config que ça sera le cas chez lui
lol fait un reset.
Car j'ai testé et tout fonctionne niquel sans pb.

et je dirais même