Projet

Général

Profil

« Précédent | Suivant » 

Révision 852

Ajouté par celasherme il y a presque 4 ans

Fonction rectrame ok , sans les checksum

Voir les différences:

branch/lashermes/sp4c12/SP4c1/DefaultSession.hsf
[WINDOW_POSITION_STATE_DATA_VD3]
[WINDOW_POSITION_STATE_DATA_VD4]
[WINDOW_Z_ORDER]
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\SP4C1.c"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\ncrt0.a30"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.h"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c"
[TARGET_NAME]
"" "" 1869837157
[STATUSBAR_STATEINFO_VD1]
branch/lashermes/sp4c12/SP4c1/SP4c1.hwp
[PROJECT_FILES]
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c" "User" "C source file" 2
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\ncrt0.a30" "User" "Assembly source file" 2
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c" "User" "C source file" 2
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.h" "User" "C header file" 2
[FOLDER]
"Assembly source file" "Assembly source file"
"C header file" "C header file"
"C source file" "C source file"
[GENERAL_DATA_PROJECT]
"USE_CUSTOM_LINKAGE_ORDER" "1"
......
[OPTIONS_Debug_Renesas M32C C Compiler]
"C source file" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c" "04c857abbab57d10" 1
[OPTIONS_Debug_Renesas M32C Configurator]
"Single Shot" "05a03f8fab757d10" 6
"Single Shot" "04c857abbab57d10" 6
[OPTIONS_Debug_Renesas M32C Librarian]
"Single Shot" "05a03f8fab757d10" 5
"Single Shot" "04c857abbab57d10" 5
[OPTIONS_Debug_Renesas M32C Linker]
"Single Shot" "05a03f8fab757d10" 3
"Single Shot" "04df77abbab57d10" 3
[OPTIONS_Debug_Renesas M32C Stype Converter]
"Single Shot" "05a03f8fab757d10" 4
"Single Shot" "04df77abbab57d10" 4
[OPTIONS_Debug]
"" 0
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6
......
[OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C C Compiler]
"C source file" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c" "04c857abbab57d10" 1
[OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Configurator]
"Single Shot" "05a03f8fab757d10" 6
"Single Shot" "04c857abbab57d10" 6
[OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Librarian]
"Single Shot" "05a03f8fab757d10" 5
"Single Shot" "04c857abbab57d10" 5
[OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Linker]
"Single Shot" "05a03f8fab757d10" 3
"Single Shot" "04df77abbab57d10" 3
[OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Stype Converter]
"Single Shot" "05a03f8fab757d10" 4
"Single Shot" "04df77abbab57d10" 4
[OPTIONS_Debug_M32C_E8a_SYSTEM]
"" 0
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6
......
[OPTIONS_Debug_M32C_Simulator_Renesas M32C C Compiler]
"C source file" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c" "04c857abbab57d10" 1
[OPTIONS_Debug_M32C_Simulator_Renesas M32C Configurator]
"Single Shot" "05a03f8fab757d10" 6
"Single Shot" "04c857abbab57d10" 6
[OPTIONS_Debug_M32C_Simulator_Renesas M32C Librarian]
"Single Shot" "05a03f8fab757d10" 5
"Single Shot" "04c857abbab57d10" 5
[OPTIONS_Debug_M32C_Simulator_Renesas M32C Linker]
"Single Shot" "05a03f8fab757d10" 3
"Single Shot" "04df77abbab57d10" 3
[OPTIONS_Debug_M32C_Simulator_Renesas M32C Stype Converter]
"Single Shot" "05a03f8fab757d10" 4
"Single Shot" "04df77abbab57d10" 4
[OPTIONS_Debug_M32C_Simulator]
"" 0
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6
......
[OPTIONS_Release_Renesas M32C C Compiler]
"C source file" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4C1\SP4C1.c" "05a03f8fab757d10" 1
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c" "04c857abbab57d10" 1
[OPTIONS_Release_Renesas M32C Configurator]
"Single Shot" "05a03f8fab757d10" 6
"Single Shot" "04c857abbab57d10" 6
[OPTIONS_Release_Renesas M32C Librarian]
"Single Shot" "05a03f8fab757d10" 5
"Single Shot" "04c857abbab57d10" 5
[OPTIONS_Release_Renesas M32C Linker]
"Single Shot" "05a03f8fab757d10" 3
"Single Shot" "04df77abbab57d10" 3
[OPTIONS_Release_Renesas M32C Stype Converter]
"Single Shot" "05a03f8fab757d10" 4
"Single Shot" "04df77abbab57d10" 4
[OPTIONS_Release]
"" 0
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6
branch/lashermes/sp4c12/SP4c1/SessionM32C_E8a_SYSTEM.hsf
0
[WINDOW_POSITION_STATE_DATA_VD1]
"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0"
"{WK_00000001_IO}SP4C1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.52" 219 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0"
"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "0.48" 219 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0"
"{WK_00000001_IO}SP4C1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.52" 219 0 0 350 200 17 0 "32817|32826|32819|32820|32821" "0.0"
"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 219 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0"
"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 241 683 371 350 200 18 0 "" "0.0"
"{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0"
"{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0"
......
[WINDOW_Z_ORDER]
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\SP4C1.c"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\ncrt0.a30"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.h"
"D:\tp4_sp4_2021_lashermes\sp4c12\SP4c1\uart0.c"
[TARGET_NAME]
"M32C E8a SYSTEM" "" 0
[STATUSBAR_STATEINFO_VD1]
branch/lashermes/sp4c12/SP4c1/SP4c1.c
return u0rb;
}
int rectrame(char * Buffer)
{
int i=0;
char c;
while(uart0_rx()!='$');
c = uart0_rx();
while(c!='*')
{
Buffer[i]= c;
i=i+1;
c = uart0_rx();
}
return i;
}
void main(void)
{
// char c='A' // on lui dit de commancer par 'A'
int i;
uart0_init();
// char c='A'; // on lui dit de commancer par 'A'
/*while(1) // emet en boucle le meme carac
{
for(i=0;i<26;i++) // pour i<26 lettres de l'aphabet donc pour ne pas depasser le Z
......
}
}*/
char c1,c2;
char trame[100]; // tableau pour stocker la trame
uart0_init(); // initialisation
while(1)
{
//uart0_tx(uart0_rx()+1);//On utilise la fonction tx pour ecrire sur le terminal le resultat que renvoie rx
c1=(char)(rectrame(trame)/10); // On divise par 10 pour avoir 6
c2=(char)(rectrame(trame)%10); // on recupere le modulo de la division soit ici 2
}
uart0_tx(c1+48);
uart0_tx(c2+48);
}
}
branch/lashermes/sp4c12/SP4c1.hws
[MAKEFILE_BUILD_INFO]
"$(WORKSPDIR)\make\$(PROJECTNAME)_$(CONFIGNAME).mak" "" "$(WORKSPDIR)\make" 0 0 0
[VD_CONFIGURATION_OPTIONS]
"ACTIVE_DESKTOP" "0"
[VD_CONFIGURATIONS]
"0" "Default1" "1"
"1" "Default2" "1"
"2" "Default3" "1"
"3" "Default4" "1"
[OPTIONS_DEBUG_TAB]
0 0 0 0 0
[VCS]

Formats disponibles : Unified diff