Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
progbob
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
herzi
P
project
bob3
progbob
Commits
8309c51e
Commit
8309c51e
authored
Oct 12, 2018
by
Sebastian Neuser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement proof of concept
parent
667b3ebc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
156 additions
and
23 deletions
+156
-23
.gitignore
.gitignore
+8
-0
.gitmodules
.gitmodules
+1
-1
Board/LEDs.h
Board/LEDs.h
+129
-0
Config/AppConfig.h
Config/AppConfig.h
+6
-10
Lib/lufa
Lib/lufa
+0
-0
Makefile
Makefile
+5
-5
ProgBob.c
ProgBob.c
+1
-1
ProgBob.h
ProgBob.h
+6
-6
No files found.
.gitignore
0 → 100644
View file @
8309c51e
obj/
/*.bin
/*.eep
/*.elf
/*.hex
/*.lss
/*.map
/*.sym
.gitmodules
View file @
8309c51e
[submodule "lufa"]
path = lufa
path =
Lib/
lufa
url = https://github.com/abcminiuser/lufa.git
Board/LEDs.h
0 → 100644
View file @
8309c51e
/*
LUFA Library
Copyright (C) Dean Camera, 2018.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaims all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
* \brief LUFA Custom Board LED Hardware Driver (Template)
*
* This is a stub driver header file, for implementing custom board
* layout hardware with compatible LUFA board specific drivers. If
* the library is configured to use the BOARD_USER board mode, this
* driver file should be completed and copied into the "/Board/" folder
* inside the application's folder.
*
* This stub is for the board-specific component of the LUFA LEDs driver,
* for the LEDs (up to four) mounted on most development boards.
*/
#ifndef __LEDS_USER_H__
#define __LEDS_USER_H__
/* Includes: */
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern
"C"
{
#endif
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif
/* Public Interface - May be used in end-application: */
/* Macros: */
/** LED mask for the first LED on the board. */
#define LEDS_LEDR (1 << 5)
/** LED mask for the second LED on the board. */
#define LEDS_LEDG (1 << 7)
/** LED mask for the third LED on the board. */
#define LEDS_LEDB (1 << 6)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LEDR | LEDS_LEDG | LEDS_LEDB)
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static
inline
void
LEDs_Init
(
void
)
{
DDRB
|=
LEDS_ALL_LEDS
;
PORTB
|=
LEDS_ALL_LEDS
;
}
static
inline
void
LEDs_Disable
(
void
)
{
DDRB
&=
~
LEDS_ALL_LEDS
;
PORTB
&=
~
LEDS_ALL_LEDS
;
}
static
inline
void
LEDs_TurnOnLEDs
(
const
uint8_t
LedMask
)
{
PORTB
&=
~
LedMask
;
}
static
inline
void
LEDs_TurnOffLEDs
(
const
uint8_t
LedMask
)
{
PORTB
|=
LedMask
;
}
static
inline
void
LEDs_SetAllLEDs
(
const
uint8_t
LedMask
)
{
PORTB
=
((
PORTB
|
LEDS_ALL_LEDS
)
&
~
LedMask
);
}
static
inline
void
LEDs_ChangeLEDs
(
const
uint8_t
LedMask
,
const
uint8_t
ActiveMask
)
{
PORTB
=
((
PORTB
|
LedMask
)
&
~
ActiveMask
);
}
static
inline
void
LEDs_ToggleLEDs
(
const
uint8_t
LEDMask
)
{
PINB
=
LEDMask
;
}
static
inline
uint8_t
LEDs_GetLEDs
(
void
)
ATTR_WARN_UNUSED_RESULT
;
static
inline
uint8_t
LEDs_GetLEDs
(
void
)
{
return
(
PORTB
&
LEDS_ALL_LEDS
);
}
#endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif
#endif
Config/AppConfig.h
View file @
8309c51e
...
...
@@ -46,21 +46,17 @@
#define AUX_LINE_PORT PORTB
#define AUX_LINE_PIN PINB
#define AUX_LINE_DDR DDRB
#if (BOARD == BOARD_U2S)
#define AUX_LINE_MASK (1 << 0)
#else
#define AUX_LINE_MASK (1 << 4)
#endif
#define AUX_LINE_MASK (1 << 0)
#define ENABLE_ISP_PROTOCOL
#define ENABLE_XPROG_PROTOCOL
//
#define ENABLE_XPROG_PROTOCOL
#define VTARGET_ADC_CHANNEL 2
#define VTARGET_REF_VOLTS 5
#define VTARGET_SCALE_FACTOR 1
//
#define VTARGET_ADC_CHANNEL 2
//
#define VTARGET_REF_VOLTS 5
//
#define VTARGET_SCALE_FACTOR 1
// #define VTARGET_USE_INTERNAL_REF
#define NO_VTARGET_DETECT
//
#define XCK_RESCUE_CLOCK_ENABLE
#define XCK_RESCUE_CLOCK_ENABLE
// #define INVERTED_ISP_MISO
// #define FIRMWARE_VERSION_MINOR 0x11
...
...
lufa
@
737382ae
Compare
737382ae
...
737382ae
File moved
m
akefile
→
M
akefile
View file @
8309c51e
...
...
@@ -11,16 +11,16 @@
# Run "make help" for target help.
MCU
=
at90usb1
287
MCU
=
at90usb1
62
ARCH
=
AVR8
BOARD
=
US
BKEY
F_CPU
=
8
000000
BOARD
=
US
ER
F_CPU
=
16
000000
F_USB
=
$(F_CPU)
OPTIMIZATION
=
s
TARGET
=
AVRISP-MKII
TARGET
=
ProgBob
SRC
=
$(TARGET)
.c AVRISPDescriptors.c Lib/V2Protocol.c Lib/V2ProtocolParams.c Lib/ISP/ISPProtocol.c Lib/ISP/ISPTarget.c Lib/XPROG/XPROGProtocol.c
\
Lib/XPROG/XPROGTarget.c Lib/XPROG/XMEGANVM.c Lib/XPROG/TINYNVM.c
$(LUFA_SRC_USB)
LUFA_PATH
=
../..
/LUFA
LUFA_PATH
=
Lib/lufa
/LUFA
CC_FLAGS
=
-DUSE_LUFA_CONFIG_HEADER
-IConfig
/
LD_FLAGS
=
...
...
AVRISP-MKII
.c
→
ProgBob
.c
View file @
8309c51e
...
...
@@ -34,7 +34,7 @@
* the project and is responsible for the initial application hardware configuration.
*/
#include "
AVRISP-MKII
.h"
#include "
ProgBob
.h"
#if (BOARD != BOARD_NONE)
/* Some board hardware definitions (e.g. the Arduino Micro) have their LEDs defined on the same pins
...
...
AVRISP-MKII
.h
→
ProgBob
.h
View file @
8309c51e
...
...
@@ -56,22 +56,22 @@
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
#define LEDMASK_USB_NOTREADY
LEDS_LED1
#define LEDMASK_USB_NOTREADY
(LEDS_LEDG | LEDS_LEDB) // cyan
/** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
#define LEDMASK_USB_ENUMERATING (LEDS_LED
1 | LEDS_LED2)
#define LEDMASK_USB_ENUMERATING (LEDS_LED
R | LEDS_LEDG) // yellow
/** LED mask for the library LED driver, to indicate that the USB interface is ready. */
#define LEDMASK_USB_READY LEDS_LED
2
#define LEDMASK_USB_READY LEDS_LED
G
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR LEDS_LED
1
#define LEDMASK_USB_ERROR LEDS_LED
R
/** LED mask for the library LED driver, to indicate that the USB interface is busy. */
#define LEDMASK_BUSY (LEDS_LED
1 | LEDS_LED2)
#define LEDMASK_BUSY (LEDS_LED
R | LEDS_LEDB) // magenta
/** LED mask for the library LED driver, to indicate that the target is being powered by VBUS. */
#define LEDMASK_VBUSPOWER LEDS_LED
3
#define LEDMASK_VBUSPOWER LEDS_LED
B
/* Function Prototypes: */
void
SetupHardware
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment