diff --git a/features/TESTS/filesystem/heap_block_device/main.cpp b/features/TESTS/filesystem/heap_block_device/main.cpp index aa68ce2912..eb057fef8e 100644 --- a/features/TESTS/filesystem/heap_block_device/main.cpp +++ b/features/TESTS/filesystem/heap_block_device/main.cpp @@ -48,7 +48,7 @@ void test_read_write() { } // Write, sync, and read the block - err = bd.write(write_block, 0, BLOCK_SIZE); + err = bd.program(write_block, 0, BLOCK_SIZE); TEST_ASSERT_EQUAL(0, err); err = bd.read(read_block, 0, BLOCK_SIZE); diff --git a/features/TESTS/filesystem/util_block_device/main.cpp b/features/TESTS/filesystem/util_block_device/main.cpp index 52fe0cc10a..98933c14c1 100644 --- a/features/TESTS/filesystem/util_block_device/main.cpp +++ b/features/TESTS/filesystem/util_block_device/main.cpp @@ -49,7 +49,7 @@ void test_slicing() { int err = slice1.init(); TEST_ASSERT_EQUAL(0, err); - TEST_ASSERT_EQUAL(BLOCK_SIZE, slice1.get_write_size()); + TEST_ASSERT_EQUAL(BLOCK_SIZE, slice1.get_program_size()); TEST_ASSERT_EQUAL((BLOCK_COUNT/2)*BLOCK_SIZE, slice1.size()); // Fill with random sequence @@ -59,7 +59,7 @@ void test_slicing() { } // Write, sync, and read the block - err = slice1.write(write_block, 0, BLOCK_SIZE); + err = slice1.program(write_block, 0, BLOCK_SIZE); TEST_ASSERT_EQUAL(0, err); err = slice1.read(read_block, 0, BLOCK_SIZE); @@ -91,7 +91,7 @@ void test_slicing() { err = slice2.init(); TEST_ASSERT_EQUAL(0, err); - TEST_ASSERT_EQUAL(BLOCK_SIZE, slice2.get_write_size()); + TEST_ASSERT_EQUAL(BLOCK_SIZE, slice2.get_program_size()); TEST_ASSERT_EQUAL((BLOCK_COUNT/2)*BLOCK_SIZE, slice2.size()); // Fill with random sequence @@ -101,7 +101,7 @@ void test_slicing() { } // Write, sync, and read the block - err = slice2.write(write_block, 0, BLOCK_SIZE); + err = slice2.program(write_block, 0, BLOCK_SIZE); TEST_ASSERT_EQUAL(0, err); err = slice2.read(read_block, 0, BLOCK_SIZE); @@ -139,7 +139,7 @@ void test_chaining() { int err = chain.init(); TEST_ASSERT_EQUAL(0, err); - TEST_ASSERT_EQUAL(BLOCK_SIZE, chain.get_write_size()); + TEST_ASSERT_EQUAL(BLOCK_SIZE, chain.get_program_size()); TEST_ASSERT_EQUAL(BLOCK_COUNT*BLOCK_SIZE, chain.size()); // Fill with random sequence @@ -149,7 +149,7 @@ void test_chaining() { } // Write, sync, and read the block - err = chain.write(write_block, 0, BLOCK_SIZE); + err = chain.program(write_block, 0, BLOCK_SIZE); TEST_ASSERT_EQUAL(0, err); err = chain.read(read_block, 0, BLOCK_SIZE); @@ -162,7 +162,7 @@ void test_chaining() { } // Write, sync, and read the block - err = chain.write(write_block, (BLOCK_COUNT/2)*BLOCK_SIZE, BLOCK_SIZE); + err = chain.program(write_block, (BLOCK_COUNT/2)*BLOCK_SIZE, BLOCK_SIZE); TEST_ASSERT_EQUAL(0, err); err = chain.read(read_block, (BLOCK_COUNT/2)*BLOCK_SIZE, BLOCK_SIZE); diff --git a/features/filesystem/bd/HeapBlockDevice.h b/features/filesystem/bd/HeapBlockDevice.h index 529df9b2e9..53e17f406d 100644 --- a/features/filesystem/bd/HeapBlockDevice.h +++ b/features/filesystem/bd/HeapBlockDevice.h @@ -39,7 +39,7 @@ * * int main() { * bd.init(); - * bd.write(block, 0); + * bd.program(block, 0); * bd.read(block, 0); * printf("%s", block); * bd.deinit(); @@ -69,7 +69,7 @@ public: /** Read blocks from a block device * - * @param buffer Buffer to write blocks to + * @param buffer Buffer to read blocks into * @param addr Address of block to begin reading from * @param size Size to read in bytes, must be a multiple of read block size * @return 0 on success, negative error code on failure diff --git a/features/filesystem/bd/SlicingBlockDevice.h b/features/filesystem/bd/SlicingBlockDevice.h index 16ea93dec5..2904d68c72 100644 --- a/features/filesystem/bd/SlicingBlockDevice.h +++ b/features/filesystem/bd/SlicingBlockDevice.h @@ -86,7 +86,7 @@ public: /** Read blocks from a block device * - * @param buffer Buffer to write blocks to + * @param buffer Buffer to read blocks into * @param addr Address of block to begin reading from * @param size Size to read in bytes, must be a multiple of read block size * @return 0 on success, negative error code on failure