Skip to content
Snippets Groups Projects
Commit 3cd91f0f authored by patacongo's avatar patacongo
Browse files

Add some range checking

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3209 42af7a65-404d-4744-a932-0658087f49c3
parent 00f5d3ad
No related branches found
No related tags found
No related merge requests found
......@@ -209,9 +209,17 @@
#define LPC17_TDFREE_BASE (LPC17_EDFREE_BASE + LPC17_EDFREE_SIZE)
#define LPC17_IOFREE_BASE (LPC17_TDFREE_BASE + LPC17_TDFREE_SIZE)
#if LPC17_IOFREE_BASE > LPC17_OHCIRAM_END
# error "Insufficient OHCI RAM allocated"
#endif
/* Finally, use the remainder of the allocated OHCI for IO buffers */
#define LPC17_IOBUFFERS ((LPC17_OHCIRAM_END - LPC17_IOBUFFER_BASE) / CONFIG_USBHOST_IOBUFSIZE)
#define LPC17_IOBUFFERS ((LPC17_OHCIRAM_END - LPC17_IOFREE_BASE) / CONFIG_USBHOST_IOBUFSIZE)
#if LPC17_IOBUFFERS < 1
# warning "No IO buffers allocated"
#endif
/************************************************************************************
* Public Types
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment