forked from acco/chti23
finDuTp3
This commit is contained in:
parent
15cdcee56f
commit
66b712c46a
4 changed files with 85 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
||||||
PRESERVE8
|
PRESERVE8
|
||||||
THUMB
|
THUMB
|
||||||
|
include ../Driver/DriverJeuLaser.inc
|
||||||
|
|
||||||
; ====================== zone de réservation de données, ======================================
|
; ====================== zone de réservation de données, ======================================
|
||||||
;Section RAM (read only) :
|
;Section RAM (read only) :
|
||||||
|
@ -10,7 +10,15 @@
|
||||||
;Section RAM (read write):
|
;Section RAM (read write):
|
||||||
area maram,data,readwrite
|
area maram,data,readwrite
|
||||||
|
|
||||||
|
index dcd 5512
|
||||||
|
SortieSon dcw 0
|
||||||
|
|
||||||
|
export index
|
||||||
|
export SortieSon
|
||||||
|
export Callbackson
|
||||||
|
|
||||||
|
extern Son
|
||||||
|
extern LongueurSon
|
||||||
|
|
||||||
; ===============================================================================================
|
; ===============================================================================================
|
||||||
|
|
||||||
|
@ -21,10 +29,40 @@
|
||||||
area moncode,code,readonly
|
area moncode,code,readonly
|
||||||
; écrire le code ici
|
; écrire le code ici
|
||||||
|
|
||||||
|
;r0 Son
|
||||||
|
;r1 Index
|
||||||
|
;r2 Adresse index
|
||||||
|
;r3 Pour les calculs
|
||||||
|
|
||||||
|
Callbackson
|
||||||
|
|
||||||
|
ldr r2, =index
|
||||||
|
ldr r1, [r2]
|
||||||
|
|
||||||
|
ldr r0, =Son
|
||||||
|
|
||||||
|
ldr r3, =LongueurSon
|
||||||
|
|
||||||
|
cmp r1, r3
|
||||||
|
bne Conversion
|
||||||
|
|
||||||
|
mov r0, #0
|
||||||
|
|
||||||
|
|
||||||
|
Conversion
|
||||||
|
|
||||||
|
add r0, #32768
|
||||||
|
mov r3, #719
|
||||||
|
mul r0, r3
|
||||||
|
mov r3, #65535
|
||||||
|
udiv r0, r3
|
||||||
|
|
||||||
|
|
||||||
|
add r1, #1
|
||||||
|
str r1, [r2]
|
||||||
|
|
||||||
|
ldr r3, =SortieSon
|
||||||
|
str r3,[r0]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
|
|
||||||
|
void Callbackson(void);
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
@ -14,8 +14,11 @@ int main(void)
|
||||||
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
|
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
|
||||||
CLOCK_Configure();
|
CLOCK_Configure();
|
||||||
|
|
||||||
|
Timer_1234_Init_ff(TIM4,6552);
|
||||||
|
|
||||||
|
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
|
||||||
|
|
||||||
|
Active_IT_Debordement_Timer(TIM4, 2, Callbackson);
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -23,6 +26,7 @@ CLOCK_Configure();
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<aExt>*.s*; *.src; *.a*</aExt>
|
<aExt>*.s*; *.src; *.a*</aExt>
|
||||||
<oExt>*.obj; *.o</oExt>
|
<oExt>*.obj; *.o</oExt>
|
||||||
<lExt>*.lib</lExt>
|
<lExt>*.lib</lExt>
|
||||||
<tExt>*.txt; *.h; *.inc</tExt>
|
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||||
<pExt>*.plm</pExt>
|
<pExt>*.plm</pExt>
|
||||||
<CppX>*.cpp</CppX>
|
<CppX>*.cpp</CppX>
|
||||||
<nMigrate>0</nMigrate>
|
<nMigrate>0</nMigrate>
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>0</IsCurrentTarget>
|
<IsCurrentTarget>1</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
@ -460,7 +460,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>1</IsCurrentTarget>
|
<IsCurrentTarget>0</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
<GroupNumber>1</GroupNumber>
|
<GroupNumber>1</GroupNumber>
|
||||||
<FileNumber>1</FileNumber>
|
<FileNumber>1</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>.\Src\principal.c</PathWithFileName>
|
<PathWithFileName>.\Src\principal.c</PathWithFileName>
|
||||||
|
@ -624,6 +624,18 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>1</GroupNumber>
|
||||||
|
<FileNumber>2</FileNumber>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>.\Src\GestionSon.s</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>GestionSon.s</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -634,7 +646,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>2</FileNumber>
|
<FileNumber>3</FileNumber>
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
@ -654,7 +666,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>3</GroupNumber>
|
<GroupNumber>3</GroupNumber>
|
||||||
<FileNumber>3</FileNumber>
|
<FileNumber>4</FileNumber>
|
||||||
<FileType>4</FileType>
|
<FileType>4</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<TargetName>Simu</TargetName>
|
<TargetName>Simu</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
@ -388,6 +388,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.s</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -797,6 +802,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.s</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -1275,6 +1285,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.s</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -1322,12 +1337,7 @@
|
||||||
<LayerInfo>
|
<LayerInfo>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer>
|
<Layer>
|
||||||
<LayName><Project Info></LayName>
|
<LayName>StepSon</LayName>
|
||||||
<LayDesc></LayDesc>
|
|
||||||
<LayUrl></LayUrl>
|
|
||||||
<LayKeys></LayKeys>
|
|
||||||
<LayCat></LayCat>
|
|
||||||
<LayLic></LayLic>
|
|
||||||
<LayTarg>0</LayTarg>
|
<LayTarg>0</LayTarg>
|
||||||
<LayPrjMark>1</LayPrjMark>
|
<LayPrjMark>1</LayPrjMark>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
Loading…
Reference in a new issue