From 99145a8d7c88d9af065cfb7f5e8507d5b65ff811 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 26 Feb 2009 05:48:47 +0000 Subject: Makefiles and library modified to add a new F_CLOCK constant to give the unprescaled master input clock frequency, so that the correct PLL mask can be determined even when the CPU (F_CPU) clock rate is prescaled outside the normal input range of the PLL. Started to clean up the AVRISP Programmer project code, donated by Opendous Inc. --- Demos/RNDISEthernet/makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Demos/RNDISEthernet') diff --git a/Demos/RNDISEthernet/makefile b/Demos/RNDISEthernet/makefile index 840b9d8d5..ba1588af6 100644 --- a/Demos/RNDISEthernet/makefile +++ b/Demos/RNDISEthernet/makefile @@ -90,6 +90,20 @@ BOARD = USBKEY F_CPU = 8000000 +# Input clock frequency. +# This will define a symbol, F_CLOCK, in all source code files equal to the +# input clock frequency (before any prescaling is performed). This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_CLOCK = 8000000 + + # Output format. (can be srec, ihex, binary) FORMAT = ihex @@ -171,8 +185,10 @@ CSTANDARD = -std=gnu99 # Place -D or -U options here for C sources -CDEFS = -DF_CPU=$(F_CPU)UL -DBOARD=BOARD_$(BOARD) -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_STREAM_CALLBACKS -CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) +CDEFS += -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_STREAM_CALLBACKS -DUSB_DEVICE_ONLY +CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" + CDEFS += -DNO_DECODE_ETHERNET -DNO_DECODE_ARP -DNO_DECODE_ICMP -DNO_DECODE_IP -DNO_DECODE_TCP -DNO_DECODE_UDP -DNO_DECODE_DHCP -- cgit v1.2.3