mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9333 from offirko/offir_doxygen
Minor Doxygen fixes for BufferedBlockDevice and iBeaconpull/9787/head
commit
3b43a2d976
|
@ -28,8 +28,8 @@
|
||||||
* number generally used to determine the location of devices or physical objects
|
* number generally used to determine the location of devices or physical objects
|
||||||
* near a mobile phone user.
|
* near a mobile phone user.
|
||||||
*
|
*
|
||||||
* iOS scans for iBeacon devices in a background task and notifies Apps
|
* iOS scans for iBeacon devices in a background task and notifies apps
|
||||||
* subscribed to a specific region when the area is entered or left. Apps may
|
* that subscribe to a specific region when a device enters or leaves an area. Apps may
|
||||||
* use this information to display context-aware content to users.
|
* use this information to display context-aware content to users.
|
||||||
*
|
*
|
||||||
* As an example, a museum can deploy an app that informs the user when one of
|
* As an example, a museum can deploy an app that informs the user when one of
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
* of iBeacons in relevant touristic locations it operates. The UUID may
|
* of iBeacons in relevant touristic locations it operates. The UUID may
|
||||||
* identify a place managed by the city. The major ID would identify the place;
|
* identify a place managed by the city. The major ID would identify the place;
|
||||||
* it can be a museum, a historic monument, a metro station and so on. The minor ID
|
* it can be a museum, a historic monument, a metro station and so on. The minor ID
|
||||||
* would locate a specific spot within a specific city place. It can be a
|
* would identify a specific spot within a specific city place. It can be a
|
||||||
* piece of art, a ticket dispenser or a relevant point of interest.
|
* piece of art, a ticket dispenser or a relevant point of interest.
|
||||||
*
|
*
|
||||||
* Each iBeacon device is physically attached to the spot it locates and
|
* Each iBeacon device is physically attached to the spot it locates and
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
*
|
*
|
||||||
* @attention If you are interested in manufacturing iBeacons, you must obtain a
|
* @attention If you are interested in manufacturing iBeacons, you must obtain a
|
||||||
* license from Apple. More information at https://developer.apple.com/ibeacon/.
|
* license from Apple. More information at https://developer.apple.com/ibeacon/.
|
||||||
* The licence also grant access to the iBeacons technical specification.
|
* The license also grant access to the iBeacons technical specification.
|
||||||
*
|
*
|
||||||
* @note More information at https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf
|
* @note More information at https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf
|
||||||
*
|
*
|
||||||
|
@ -88,9 +88,9 @@ MBED_DEPRECATED_SINCE(
|
||||||
"mbed-os-5.11",
|
"mbed-os-5.11",
|
||||||
"This service is deprecated, and no replacement is currently available."
|
"This service is deprecated, and no replacement is currently available."
|
||||||
)
|
)
|
||||||
class iBeacon
|
class iBeacon {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
#if !(DOXYGEN_ONLY)
|
||||||
/**
|
/**
|
||||||
* Data buffer of a location UUID.
|
* Data buffer of a location UUID.
|
||||||
*/
|
*/
|
||||||
|
@ -116,12 +116,12 @@ public:
|
||||||
uint16_t companyID;
|
uint16_t companyID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Packet ID; Equal to 2 for an iBeacon.
|
* Packet ID; equal to 2 for an iBeacon.
|
||||||
*/
|
*/
|
||||||
uint8_t ID;
|
uint8_t ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Length of the remaining data presents in the payload.
|
* Length of the remaining data present in the payload.
|
||||||
*/
|
*/
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public:
|
||||||
uint8_t proximityUUID[16];
|
uint8_t proximityUUID[16];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Beacon Major group ID.
|
* Beacon major group ID.
|
||||||
*/
|
*/
|
||||||
uint16_t majorNumber;
|
uint16_t majorNumber;
|
||||||
|
|
||||||
|
@ -150,11 +150,11 @@ public:
|
||||||
* Assemble an iBeacon payload.
|
* Assemble an iBeacon payload.
|
||||||
*
|
*
|
||||||
* @param[in] uuid Beacon network ID. iBeacon operators use this value
|
* @param[in] uuid Beacon network ID. iBeacon operators use this value
|
||||||
* to group their iBeacons into a single network, a single region and
|
* to group their iBeacons into a single network, a single region, and
|
||||||
* identify their organization among others.
|
* identify their organization among others.
|
||||||
*
|
*
|
||||||
* @param[in] majNum Beacon major group ID. iBeacon exploitants may use
|
* @param[in] majNum Beacon major group ID. iBeacon exploitants may use
|
||||||
* this field to divide the region into subregions, their network into
|
* this field to divide the region into subregions, and their network into
|
||||||
* subnetworks.
|
* subnetworks.
|
||||||
*
|
*
|
||||||
* @param[in] minNum Identifier of the Beacon in its subregion.
|
* @param[in] minNum Identifier of the Beacon in its subregion.
|
||||||
|
@ -181,7 +181,7 @@ public:
|
||||||
memcpy(proximityUUID, uuid, sizeof(LocationUUID_t));
|
memcpy(proximityUUID, uuid, sizeof(LocationUUID_t));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif //#if !(DOXYGEN_ONLY)
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Construct an iBeacon::Payload and register it into Gap.
|
* Construct an iBeacon::Payload and register it into Gap.
|
||||||
|
@ -189,17 +189,17 @@ public:
|
||||||
* @param[in] _ble The BLE interface to configure with the iBeacon payload.
|
* @param[in] _ble The BLE interface to configure with the iBeacon payload.
|
||||||
*
|
*
|
||||||
* @param[in] uuid Beacon network ID. iBeacon operators use this value
|
* @param[in] uuid Beacon network ID. iBeacon operators use this value
|
||||||
* to group their iBeacons into a single network, a single region and
|
* to group their iBeacons into a single network, a single region, and
|
||||||
* identify their organization among others.
|
* identify their organization among others.
|
||||||
*
|
*
|
||||||
* @param[in] majNum Beacon major group ID. iBeacon exploitants may use
|
* @param[in] majNum Beacon major group ID. iBeacon fleet operators may use
|
||||||
* this field to divide the region into subregions, their network into
|
* this field to divide the region into subregions, and their network into
|
||||||
* subnetworks.
|
* subnetworks.
|
||||||
*
|
*
|
||||||
* @param[in] minNum Identifier of the Beacon in its subregion.
|
* @param[in] minNum Identifier of the Beacon in its subregion.
|
||||||
*
|
*
|
||||||
* @param[in] txP Measured transmit power of the beacon at 1
|
* @param[in] txP Measured transmit power of the beacon at distance of
|
||||||
* meter. Scanners use this parameter to approximate the distance
|
* one meter. Scanners use this parameter to approximate the distance
|
||||||
* to the beacon.
|
* to the beacon.
|
||||||
*
|
*
|
||||||
* @param[in] compID ID of the beacon manufacturer.
|
* @param[in] compID ID of the beacon manufacturer.
|
||||||
|
|
|
@ -35,35 +35,36 @@ namespace mbed {
|
||||||
*/
|
*/
|
||||||
class BufferedBlockDevice : public BlockDevice {
|
class BufferedBlockDevice : public BlockDevice {
|
||||||
public:
|
public:
|
||||||
/** Lifetime of the memory block device
|
/** Lifetime of a memory-buffered block device wrapping an underlying block device
|
||||||
*
|
*
|
||||||
* @param bd Block device to back the BufferedBlockDevice
|
* @param bd Block device to back the BufferedBlockDevice
|
||||||
*/
|
*/
|
||||||
BufferedBlockDevice(BlockDevice *bd);
|
BufferedBlockDevice(BlockDevice *bd);
|
||||||
|
|
||||||
/** Lifetime of a block device
|
/** Lifetime of the memory-buffered block device
|
||||||
*/
|
*/
|
||||||
virtual ~BufferedBlockDevice();
|
virtual ~BufferedBlockDevice();
|
||||||
|
|
||||||
/** Initialize a block device
|
/** Initialize a buffered-memory block device and its underlying block device
|
||||||
*
|
*
|
||||||
* @return 0 on success or a negative error code on failure
|
* @return 0 on success or a negative error code on failure
|
||||||
*/
|
*/
|
||||||
virtual int init();
|
virtual int init();
|
||||||
|
|
||||||
/** Deinitialize a block device
|
/** Deinitialize the buffered-memory block device and its underlying block device
|
||||||
*
|
*
|
||||||
* @return 0 on success or a negative error code on failure
|
* @return 0 on success or a negative error code on failure
|
||||||
*/
|
*/
|
||||||
virtual int deinit();
|
virtual int deinit();
|
||||||
|
|
||||||
/** Ensure data on storage is in sync with the driver
|
/** Ensure that data on the underlying storage block device is in sync with the
|
||||||
|
* memory-buffered block device
|
||||||
*
|
*
|
||||||
* @return 0 on success or a negative error code on failure
|
* @return 0 on success or a negative error code on failure
|
||||||
*/
|
*/
|
||||||
virtual int sync();
|
virtual int sync();
|
||||||
|
|
||||||
/** Read blocks from a block device
|
/** Read blocks from the memory-buffered block device
|
||||||
*
|
*
|
||||||
* @param buffer Buffer to read blocks into
|
* @param buffer Buffer to read blocks into
|
||||||
* @param addr Address of block to begin reading from
|
* @param addr Address of block to begin reading from
|
||||||
|
@ -72,9 +73,9 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual int read(void *buffer, bd_addr_t addr, bd_size_t size);
|
virtual int read(void *buffer, bd_addr_t addr, bd_size_t size);
|
||||||
|
|
||||||
/** Program blocks to a block device
|
/** Program data to the memory-buffered block device
|
||||||
*
|
*
|
||||||
* The blocks must have been erased prior to being programmed
|
* The write address blocks must be erased prior to being programmed.
|
||||||
*
|
*
|
||||||
* @param buffer Buffer of data to write to blocks
|
* @param buffer Buffer of data to write to blocks
|
||||||
* @param addr Address of block to begin writing to
|
* @param addr Address of block to begin writing to
|
||||||
|
@ -83,10 +84,10 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual int program(const void *buffer, bd_addr_t addr, bd_size_t size);
|
virtual int program(const void *buffer, bd_addr_t addr, bd_size_t size);
|
||||||
|
|
||||||
/** Erase blocks on a block device
|
/** Erase blocks from the memory-buffered block device
|
||||||
*
|
*
|
||||||
* The state of an erased block is undefined until it has been programmed,
|
* The state of an erased block is undefined until it has been programmed,
|
||||||
* unless get_erase_value returns a non-negative byte value
|
* unless get_erase_value returns a non-negative byte value.
|
||||||
*
|
*
|
||||||
* @param addr Address of block to begin erasing
|
* @param addr Address of block to begin erasing
|
||||||
* @param size Size to erase in bytes, must be a multiple of erase block size
|
* @param size Size to erase in bytes, must be a multiple of erase block size
|
||||||
|
@ -127,7 +128,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bd_size_t get_erase_size() const;
|
virtual bd_size_t get_erase_size() const;
|
||||||
|
|
||||||
/** Get the size of an erasable block given address
|
/** Get the size of an erasable block of a given address
|
||||||
*
|
*
|
||||||
* @param addr Address within the erasable block
|
* @param addr Address within the erasable block
|
||||||
* @return Size of an erasable block in bytes
|
* @return Size of an erasable block in bytes
|
||||||
|
@ -135,7 +136,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bd_size_t get_erase_size(bd_addr_t addr) const;
|
virtual bd_size_t get_erase_size(bd_addr_t addr) const;
|
||||||
|
|
||||||
/** Get the value of storage when erased
|
/** Get the value of storage data after being erased
|
||||||
*
|
*
|
||||||
* If get_erase_value returns a non-negative byte value, the underlying
|
* If get_erase_value returns a non-negative byte value, the underlying
|
||||||
* storage is set to that value when erased, and storage containing
|
* storage is set to that value when erased, and storage containing
|
||||||
|
@ -152,9 +153,9 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bd_size_t size() const;
|
virtual bd_size_t size() const;
|
||||||
|
|
||||||
/** Get the BlockDevice class type.
|
/** Get the underlying BlockDevice class type
|
||||||
*
|
*
|
||||||
* @return A string represent the BlockDevice class type.
|
* @return A string representing the underlying BlockDevice class type
|
||||||
*/
|
*/
|
||||||
virtual const char *get_type() const;
|
virtual const char *get_type() const;
|
||||||
|
|
||||||
|
@ -170,6 +171,7 @@ protected:
|
||||||
uint32_t _init_ref_count;
|
uint32_t _init_ref_count;
|
||||||
bool _is_initialized;
|
bool _is_initialized;
|
||||||
|
|
||||||
|
#if !(DOXYGEN_ONLY)
|
||||||
/** Flush data in cache
|
/** Flush data in cache
|
||||||
*
|
*
|
||||||
* @return 0 on success or a negative error code on failure
|
* @return 0 on success or a negative error code on failure
|
||||||
|
@ -181,7 +183,7 @@ protected:
|
||||||
* @return none
|
* @return none
|
||||||
*/
|
*/
|
||||||
void invalidate_write_cache();
|
void invalidate_write_cache();
|
||||||
|
#endif //#if !(DOXYGEN_ONLY)
|
||||||
};
|
};
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue