Mercurial > nand-ecoscentric
comparison packages/io/nand/current/tests/nand_readlimits.c @ 3387:c1cbf062a826
io/nand: Add CYGINT_IO_NAND_TEST_PARTITION to specify which partition the tests should use.
| author | Ross Younger <wry@ecoscentric.com> |
|---|---|
| date | Sat, 27 Sep 2014 12:35:37 +1200 |
| parents | 8502a048ad17 |
| children | 7905ed422fdf |
comparison
equal
deleted
inserted
replaced
| 3386:3ec9445648cd | 3387:c1cbf062a826 |
|---|---|
| 104 CYG_TEST_NA("No NAND devices found"); | 104 CYG_TEST_NA("No NAND devices found"); |
| 105 | 105 |
| 106 diag_printf("Using NAND device %s\n", cyg_nanddevtab->devname); | 106 diag_printf("Using NAND device %s\n", cyg_nanddevtab->devname); |
| 107 CYG_TEST_CHECK(0==cyg_nand_lookup(cyg_nanddevtab->devname, &dev),"lookup failed"); | 107 CYG_TEST_CHECK(0==cyg_nand_lookup(cyg_nanddevtab->devname, &dev),"lookup failed"); |
| 108 | 108 |
| 109 prt = cyg_nand_get_partition(dev, 0); | 109 CYG_TEST_CHECK( NULL != (prt = cyg_nand_get_partition(dev, CYGINT_IO_NAND_TEST_PARTITION)), "partition not present" ); |
| 110 | 110 |
| 111 /* Check we can read the first page of the partition, and the page | 111 /* Check we can read the first page of the partition, and the page |
| 112 * before it (which might be off the start of the device) */ | 112 * before it (which might be off the start of the device) */ |
| 113 TRYREAD(prt, 0, 1); | 113 TRYREAD(prt, 0, 1); |
| 114 TRYREAD(prt, -1, 0); | 114 TRYREAD(prt, -1, 0); |
