Skip to content

Commit 64eff0a

Browse files
offirkoadbridge
authored andcommitted
Minor Doxygen fixes for BufferedBlockDevice and iBeacon
1 parent 4b7f273 commit 64eff0a

File tree

2 files changed

+39
-38
lines changed

2 files changed

+39
-38
lines changed

features/FEATURE_BLE/ble/services/iBeacon.h

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/* mbed Microcontroller Library
2-
* Copyright (c) 2006-2015 ARM Limited
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
2+
* Copyright (c) 2006-2015 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616
#ifndef MBED_BLE_IBEACON_H__
1717
#define MBED_BLE_IBEACON_H__
1818

@@ -88,9 +88,9 @@ MBED_DEPRECATED_SINCE(
8888
"mbed-os-5.11",
8989
"This service is deprecated, and no replacement is currently available."
9090
)
91-
class iBeacon
92-
{
91+
class iBeacon {
9392
public:
93+
#if !(DOXYGEN_ONLY)
9494
/**
9595
* Data buffer of a location UUID.
9696
*/
@@ -176,12 +176,11 @@ class iBeacon
176176
len(0x15),
177177
majorNumber(__REV16(majNum)),
178178
minorNumber(__REV16(minNum)),
179-
txPower(transmitPower)
180-
{
179+
txPower(transmitPower) {
181180
memcpy(proximityUUID, uuid, sizeof(LocationUUID_t));
182181
}
183182
};
184-
183+
#endif //#if !(DOXYGEN_ONLY)
185184
public:
186185
/**
187186
* Construct an iBeacon::Payload and register it into Gap.
@@ -192,14 +191,14 @@ class iBeacon
192191
* to group their iBeacons into a single network, a single region and
193192
* identify their organization among others.
194193
*
195-
* @param[in] majNum Beacon major group ID. iBeacon exploitants may use
196-
* this field to divide the region into subregions, their network into
194+
* @param[in] majNum Beacon major group ID. iBeacon users may use
195+
* this field to divide the region into subregions, and their network into
197196
* subnetworks.
198197
*
199198
* @param[in] minNum Identifier of the Beacon in its subregion.
200199
*
201-
* @param[in] txP Measured transmit power of the beacon at 1
202-
* meter. Scanners use this parameter to approximate the distance
200+
* @param[in] txP Measured transmit power of the beacon at distance of
201+
* one meter. Scanners use this parameter to approximate the distance
203202
* to the beacon.
204203
*
205204
* @param[in] compID ID of the beacon manufacturer.

features/storage/blockdevice/BufferedBlockDevice.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,36 @@ namespace mbed {
3535
*/
3636
class BufferedBlockDevice : public BlockDevice {
3737
public:
38-
/** Lifetime of the memory block device
38+
/** Create a memory-buffered block device wrapping an underlying block device
3939
*
4040
* @param bd Block device to back the BufferedBlockDevice
4141
*/
4242
BufferedBlockDevice(BlockDevice *bd);
4343

44-
/** Lifetime of a block device
44+
/** Destroy the memory-buffered block device
4545
*/
4646
virtual ~BufferedBlockDevice();
4747

48-
/** Initialize a block device
48+
/** Initialize a buffered-memory block device and its underlying block device
4949
*
5050
* @return 0 on success or a negative error code on failure
5151
*/
5252
virtual int init();
5353

54-
/** Deinitialize a block device
54+
/** Deinitialize the buffered-memory block device and its underlying block device
5555
*
5656
* @return 0 on success or a negative error code on failure
5757
*/
5858
virtual int deinit();
5959

60-
/** Ensure data on storage is in sync with the driver
60+
/** Ensure that data on the underlying storage block device is in sync with the
61+
* memory-buffered block device
6162
*
6263
* @return 0 on success or a negative error code on failure
6364
*/
6465
virtual int sync();
6566

66-
/** Read blocks from a block device
67+
/** Read blocks from the memory-buffered block device
6768
*
6869
* @param buffer Buffer to read blocks into
6970
* @param addr Address of block to begin reading from
@@ -72,9 +73,9 @@ class BufferedBlockDevice : public BlockDevice {
7273
*/
7374
virtual int read(void *buffer, bd_addr_t addr, bd_size_t size);
7475

75-
/** Program blocks to a block device
76+
/** Program data to the memory-buffered block device
7677
*
77-
* The blocks must have been erased prior to being programmed
78+
* The write address blocks must be erased prior to being programmed.
7879
*
7980
* @param buffer Buffer of data to write to blocks
8081
* @param addr Address of block to begin writing to
@@ -83,10 +84,10 @@ class BufferedBlockDevice : public BlockDevice {
8384
*/
8485
virtual int program(const void *buffer, bd_addr_t addr, bd_size_t size);
8586

86-
/** Erase blocks on a block device
87+
/** Erase blocks from the memory-buffered block device
8788
*
8889
* The state of an erased block is undefined until it has been programmed,
89-
* unless get_erase_value returns a non-negative byte value
90+
* unless get_erase_value returns a non-negative byte value.
9091
*
9192
* @param addr Address of block to begin erasing
9293
* @param size Size to erase in bytes, must be a multiple of erase block size
@@ -127,15 +128,15 @@ class BufferedBlockDevice : public BlockDevice {
127128
*/
128129
virtual bd_size_t get_erase_size() const;
129130

130-
/** Get the size of an erasable block given address
131+
/** Get the size of an erasable block of a given address
131132
*
132133
* @param addr Address within the erasable block
133134
* @return Size of an erasable block in bytes
134135
* @note Must be a multiple of the program size
135136
*/
136137
virtual bd_size_t get_erase_size(bd_addr_t addr) const;
137138

138-
/** Get the value of storage when erased
139+
/** Get the value of storage data after being erased
139140
*
140141
* If get_erase_value returns a non-negative byte value, the underlying
141142
* storage is set to that value when erased, and storage containing
@@ -152,9 +153,9 @@ class BufferedBlockDevice : public BlockDevice {
152153
*/
153154
virtual bd_size_t size() const;
154155

155-
/** Get the BlockDevice class type.
156+
/** Get the underlying BlockDevice class type
156157
*
157-
* @return A string represent the BlockDevice class type.
158+
* @return A string representing the underlying BlockDevice class type
158159
*/
159160
virtual const char *get_type() const;
160161

@@ -170,6 +171,7 @@ class BufferedBlockDevice : public BlockDevice {
170171
uint32_t _init_ref_count;
171172
bool _is_initialized;
172173

174+
#if !(DOXYGEN_ONLY)
173175
/** Flush data in cache
174176
*
175177
* @return 0 on success or a negative error code on failure
@@ -181,7 +183,7 @@ class BufferedBlockDevice : public BlockDevice {
181183
* @return none
182184
*/
183185
void invalidate_write_cache();
184-
186+
#endif //#if !(DOXYGEN_ONLY)
185187
};
186188
} // namespace mbed
187189

0 commit comments

Comments
 (0)