Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB ULPI pull request #4

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6f21aca
added board files for waveshare 407I-C
dsigma Feb 20, 2013
f49f733
added sample code for full speed interface on waveshare 407I-C
dsigma Feb 20, 2013
336decb
added demo code for high speed ulpi interface
dsigma Feb 20, 2013
43475cc
fix to max packet size for high speed to be correct value of 512
dsigma Feb 20, 2013
d1fab0b
added in code for ULPI support
dsigma Feb 20, 2013
4077d34
cleanded up code style and added default for STM32_USE_USB_OTG2_HS_FS…
dsigma Feb 20, 2013
ea50a0a
removed eclipse files from repo
dsigma Feb 20, 2013
100cf77
mass storage code, modified and speed up from Badgers code, working o…
dsigma Feb 20, 2013
101b933
updated readme to describe use and building and added photo of functi…
dsigma Feb 20, 2013
2bde1f7
modified code to return SCSI errors to the host in the event of a rea…
dsigma Feb 20, 2013
4d03df8
modified state change to reset to idle state imiediatly after configu…
dsigma Feb 20, 2013
dfd3d3b
fixed state changes in the event of USB resets
dsigma Feb 20, 2013
ce41c5b
added #define to allow for disabling console of debug output
dsigma Feb 20, 2013
3702855
moved trigger tranfer variable into driver structure
dsigma Feb 21, 2013
9a32222
cleanup of misc cruft and adding comments to code
dsigma Feb 21, 2013
d96a06f
fixed restarting of command processing if device was unpluged during …
dsigma Feb 21, 2013
1546014
removed cruft
dsigma Feb 21, 2013
f9982fc
removed old un-used vcom debugging code
dsigma Feb 21, 2013
7a4cd78
disabled MSD debugging output, slows down performance tests
dsigma Feb 21, 2013
81c8db8
added ability to redefine usbd param name in anticipation of USB comp…
dsigma Feb 21, 2013
b33039d
fixed minor compiler warnings
dsigma Feb 21, 2013
fb041e3
renamed demo directory to remove fatfs because it doesnt actually uti…
dsigma Feb 21, 2013
6a1b609
removed ff.h header include
dsigma Feb 21, 2013
25afa63
initial commite of functional mass storage driver with config-specifi…
dsigma Feb 22, 2013
910afa5
created sample project with composite USB device with mass storage an…
dsigma Feb 22, 2013
402f3e4
removed fatfs from sample build
dsigma Feb 22, 2013
a19a078
pulled in code from factored mass storage driver to make code base co…
dsigma Feb 22, 2013
f2ea90f
removed old device descriptor cruft
dsigma Feb 22, 2013
085a024
refactored code to simplify projects using composite devices
dsigma Feb 22, 2013
205c272
refactored normal usb single mass storage device code to use same com…
dsigma Feb 22, 2013
8cda1e1
refactored usb mass storage device code so that it ties in with the n…
dsigma Feb 22, 2013
6833d4a
refactored usb mass storage device code so that it ties in with the n…
dsigma Feb 22, 2013
7b144cf
added ifdef to only include the header once
dsigma Feb 22, 2013
f3e5206
factored out USB start logic from mass storage driver
dsigma Feb 22, 2013
85c5250
added code to set thread name for MSD transfer thread
dsigma Feb 22, 2013
314b12c
added SD card write performance metrics to readme file.
dsigma Feb 27, 2013
e076819
modified default hal include to include mass storage driver
dsigma Feb 27, 2013
74e5ca2
Merge branch 'master' of https://github.com/dsigma/ChibiOS
dsigma Feb 28, 2013
30ce2be
updated readme for usb mass storage demo
dsigma Mar 5, 2013
2ab2854
Merge remote branch 'upstream/master'
dsigma Mar 5, 2013
caa582e
removed unused variable from msdStart() function prototype
dsigma Mar 5, 2013
35a88d3
re-aranged code and added comments to be more consistant with chibios…
dsigma Mar 5, 2013
d1aea5b
updates to doxygen docs
dsigma Mar 6, 2013
3d6ab30
modified code style to follow ChibiOS style conventions
dsigma Mar 6, 2013
a59e008
standardized USB OGT2 defines for HS on wavesshare demos
dsigma Mar 6, 2013
9c098d6
added default defines for USB ULPI High Speed USB modes to stm32f407 …
dsigma Mar 6, 2013
f180c3b
added support for enable disable of MSD callback function and counter…
dsigma Mar 25, 2013
49d11d3
added ability to disable dissconnection of usb bus on eject
dsigma Mar 28, 2013
fbc3c0f
merged in upstream chibios code and fixed merge conflict
dsigma May 2, 2013
3cd3e0d
refactored sample usb code to work with new serial USB drivers from m…
dsigma May 2, 2013
131e96c
added ifdefs to handle different HCLK rates that were causing problem…
dsigma Jun 24, 2013
2e3bb68
Merge remote branch 'upstream/master'
dsigma Jul 10, 2013
9c1fda9
updated max CDC transfer size
dsigma Jul 25, 2013
f8baa4b
added return 0 to avoid gcc warnings
dsigma Jul 25, 2013
550a4c0
Merge remote branch 'upstream/master'
dsigma Jul 25, 2013
020bb97
updated mcuconf files to be consistent with lastest upstream/master c…
dsigma Jul 25, 2013
3a10ea1
fixed minor compiler warnings
dsigma Jul 25, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions boards/WAVESHARE_OPEN_407I_C/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012 Giovanni Di Sirio.

This file is part of ChibiOS/RT.

ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

ChibiOS/RT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "ch.h"
#include "hal.h"

#if HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
const PALConfig pal_default_config =
{
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
};
#endif

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {

stm32_clock_init();
}

#if HAL_USE_SDC || defined(__DOXYGEN__)
/**
* @brief SDC card detection.
*/
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {

(void)sdcp;
/* TODO: Fill the implementation.*/
return TRUE;
}

/**
* @brief SDC card write protection detection.
*/
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {

(void)sdcp;
/* TODO: Fill the implementation.*/
return FALSE;
}
#endif /* HAL_USE_SDC */

#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
return TRUE;
}

/**
* @brief MMC_SPI card write protection detection.
*/
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
return FALSE;
}
#endif

/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
}
Loading