Skip to content

Commit

Permalink
Merge pull request #15 from ahmedosama07/refactor
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
ahmedosama07 authored Dec 30, 2023
2 parents 0add3a7 + ac3c762 commit 80c884a
Show file tree
Hide file tree
Showing 29 changed files with 102 additions and 3,280 deletions.
16 changes: 16 additions & 0 deletions software/Examples/AVRUSBBOOT.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* AVRUSBBOOT.c
*
* Created: 12/18/2023 10:27:54 AM
* Author: LEGION
*/

#include "AVRUSBBOOT.h"

void (*jump_to_boot)(void) = 0x1800;

void wait() {
if (BOOTLOADER_CONDITION) {
jump_to_boot();
}
}
24 changes: 24 additions & 0 deletions software/Examples/AVRUSBBOOT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* AVRUSBBOOT.h
*
* Created: 12/18/2023 10:25:39 AM
* Author: LEGION
*/

#ifndef AVRUSBBOOT_H

#define AVRUSBBOOT_H

#ifndef F_CPU
#define F_CPU 12000000UL
#endif

#define BOOTLOADER_CONDITION ((PINC & (1 << PC2)) == 0)

#include <avr/io.h>
#include <util/delay.h>

void wait();


#endif
27 changes: 27 additions & 0 deletions software/Examples/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Blink.c
*
* Created: 12/18/2023 9:36:15 AM
* Author : LEGION
*/
#include "AVRUSBBOOT.h"

int main(void)
{
DDRC = 0x03;
PORTC = 0x00;

while(1)
{
//TODO:: Please write your application code
PORTC |= (1 << PINC0);
PORTC &= ~(1 << PINC1);
_delay_ms(1000);

PORTC &= ~(1 << PINC0);
PORTC |= (1 << PINC1);
_delay_ms(1000);

wait();
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions software/Windows/x64/Release/Blink.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:1000000012C024C023C022C021C020C01FC01EC0F7
:100010001DC01CC01BC01AC019C018C017C016C014
:1000200015C014C013C011241FBECFE5D4E0DEBF3D
:10003000CDBF10E0A0E6B0E0E8EAF0E002C0059035
:100040000D92A236B107D9F70AD02CC0D9CF9A9910
:1000500005C0E0916000F09161000995089583E08A
:1000600084BB15BA85B3816085BB85B38D7F85BBA5
:100070002FEF8EE994E2215080409040E1F700C0DC
:10008000000085B38E7F85BB85B3826085BB2FEF73
:100090008EE994E2215080409040E1F700C00000DA
:0800A000D6DFE0CFF894FFCF9A
:0200A80000183E
:00000001FF
12 changes: 12 additions & 0 deletions software/Windows/x64/Release/BlinkPC0.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:1000000012C024C023C022C021C020C01FC01EC0F7
:100010001DC01CC01BC01AC019C018C017C016C014
:1000200015C014C013C011241FBECFE5D4E0DEBF3D
:10003000CDBF10E0A0E6B0E0ECE9F0E002C0059032
:100040000D92A236B107D9F70AD026C0D9CF9A9916
:1000500005C0E0916000F09161000995089583E08A
:1000600084BB15BA85B3816085BB2FEF8EE994E21E
:10007000215080409040E1F700C0000085B38E7FA2
:1000800085BB2FEF8EE994E2215080409040E1F74C
:0C00900000C00000DCDFE6CFF894FFCFDA
:02009C0000184A
:00000001FF
10 changes: 10 additions & 0 deletions software/Windows/x64/Release/clearLEDS.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:1000000012C024C023C022C021C020C01FC01EC0F7
:100010001DC01CC01BC01AC019C018C017C016C014
:1000200015C014C013C011241FBECFE5D4E0DEBF3D
:10003000CDBF10E0A0E6B0E0E8E7F0E002C0059038
:100040000D92A236B107D9F70AD014C0D9CF9A9928
:1000500005C0E0916000F09161000995089583E08A
:1000600084BB15BA85B38D7F85BB85B38E7F85BB79
:08007000EEDFF8CFF894FFCF9A
:0200780000186E
:00000001FF
Binary file added software/Windows/x64/Release/testUSB.exe
Binary file not shown.
Binary file added software/Windows/x64/Release/testUSB.pdb
Binary file not shown.
Binary file removed software/test/Debug/Exe/LED.elf
Binary file not shown.
8 changes: 0 additions & 8 deletions software/test/Debug/Exe/LED.hex

This file was deleted.

49 changes: 0 additions & 49 deletions software/test/Debug/Exe/LED.rom

This file was deleted.

49 changes: 0 additions & 49 deletions software/test/Debug/Link/LED.a

This file was deleted.

Binary file removed software/test/Debug/Link/LED.o
Binary file not shown.
Loading

0 comments on commit 80c884a

Please sign in to comment.