mirror of https://github.com/ARMmbed/mbed-os.git
Add sync level documentation to classes
Document public classes to indicate level of protection provided.pull/1863/head
parent
feb60784e9
commit
a6f611b706
|
|
@ -25,6 +25,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** An analog input, used for reading the voltage on a pin
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** An analog output, used for setting the voltage on a pin
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital input bus, used for reading the state of a collection of pins
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*/
|
||||
class BusIn {
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital input output bus, used for setting the state of a collection of pins
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*/
|
||||
class BusInOut {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ public:
|
|||
*
|
||||
* @param p<n> DigitalOut pin to connect to bus bit <n> (p5-p30, NC)
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* @note
|
||||
* It is only required to specify as many pin variables as is required
|
||||
* for the bus; the rest will default to NC (not connected)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** CANMessage class
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*/
|
||||
class CANMessage : public CAN_Message {
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,11 @@
|
|||
/* IRQ/Exception compatible thunk entry function */
|
||||
typedef void (*CThunkEntry)(void);
|
||||
|
||||
/**
|
||||
* Class for created a pointer with data bound to it
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*/
|
||||
template<class T>
|
||||
class CThunk
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ namespace mbed {
|
|||
* sequence using CallChain::call(). Used mostly by the interrupt chaining code,
|
||||
* but can be used for other purposes.
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* #include "mbed.h"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ namespace mbed {
|
|||
|
||||
|
||||
/** Callback class based on template specialization
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*/
|
||||
template <typename F>
|
||||
class Callback;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Templated Circular buffer class
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
template<typename T, uint32_t BufferSize, typename CounterType = uint32_t>
|
||||
class CircularBuffer {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital input, used for reading the state of a pin
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital input/output, used for setting or reading a bi-directional pin
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class DigitalInOut {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital output, used for setting the state of a pin
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ namespace mbed {
|
|||
* The root directory is considered to contain all FileLike and
|
||||
* FileSystemLike objects, so the DIR* returned by opendir("/") will
|
||||
* reflect this.
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class DirHandle {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** An ethernet interface, to use with the ethernet pins.
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ namespace mbed {
|
|||
*
|
||||
* No one ever directly tals to/instanciates a FileHandle - it gets
|
||||
* created by FileSystem, and wrapped up by stdio.
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class FileHandle {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ namespace mbed {
|
|||
* A file-like object is one that can be opened with fopen by
|
||||
* fopen("/name", mode). It is intersection of the classes Base and
|
||||
* FileHandle.
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class FileLike : public FileHandle, public FileBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ namespace mbed {
|
|||
*
|
||||
* Implementations must define at least open (the default definitions
|
||||
* of the rest of the functions just return error values).
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class FileSystemLike : public FileBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** An I2C Master, used for communicating with I2C slave devices
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** An I2C Slave, used for communicating with an I2C Master device
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A digital interrupt input, used to call a function on a rising or falling edge
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Use this singleton if you need to chain interrupt handlers.
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example (for LPC1768):
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ protected:
|
|||
* mbed Microcontroller. Once created, the standard C file access functions are used to open,
|
||||
* read and write files.
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* #include "mbed.h"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Low Power Ticker
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class LowPowerTicker : public Ticker {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Low Power Timout
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class LowPowerTimeout : public LowPowerTicker {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Low power timer
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class LowPowerTimer : public Timer {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A multiple pin digital input
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A multiple pin digital in/out used to set/read multiple bi-directional pins
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class PortInOut {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
namespace mbed {
|
||||
/** A multiple pin digital out
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A pulse-width modulation digital output
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ namespace mbed {
|
|||
* Can be used for Full Duplex communication, or Simplex by specifying
|
||||
* one pin as NC (Not Connected)
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Send a char to the PC
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ namespace mbed {
|
|||
* Most SPI devices will also require Chip Select and Reset signals. These
|
||||
* can be controlled using <DigitalOut> pins
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Send a byte to a SPI slave, and record the response
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ namespace mbed {
|
|||
*
|
||||
* The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Reply to a SPI master as slave
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ namespace mbed {
|
|||
* Can be used for Full Duplex communication, or Simplex by specifying
|
||||
* one pin as NC (Not Connected)
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Print "Hello World" to the PC
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ namespace mbed {
|
|||
|
||||
/** A base class for serial port implementations
|
||||
* Can't be instantiated directly (use Serial or RawSerial)
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class SerialBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ extern void mbed_set_unbuffered_stream(FILE *_file);
|
|||
extern int mbed_getc(FILE *_file);
|
||||
extern char* mbed_gets(char *s, int size, FILE *_file);
|
||||
|
||||
/** File stream
|
||||
*
|
||||
* @Note Synchronization level: Set by subclass
|
||||
*/
|
||||
class Stream : public FileLike {
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ namespace mbed {
|
|||
*
|
||||
* You can use as many seperate Ticker objects as you require.
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Toggle the blinking led after 5 seconds
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ namespace mbed {
|
|||
*
|
||||
* You can use as many seperate Timeout objects as you require.
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* // Blink until timeout.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
namespace mbed {
|
||||
|
||||
/** A general purpose timer
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
namespace mbed {
|
||||
|
||||
/** Base abstraction for timer interrupts
|
||||
*/
|
||||
*
|
||||
* @Note Synchronization level: Interrupt safe
|
||||
*/
|
||||
class TimerEvent {
|
||||
public:
|
||||
TimerEvent();
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ typedef struct {
|
|||
} transaction_t;
|
||||
|
||||
/** Transaction class defines a transaction.
|
||||
*
|
||||
* @Note Synchronization level: Not protected
|
||||
*/
|
||||
template<typename Class>
|
||||
class Transaction {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ extern "C" {
|
|||
*
|
||||
* @param t Number of seconds since January 1, 1970 (the UNIX timestamp)
|
||||
*
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* #include "mbed.h"
|
||||
|
|
@ -71,7 +73,7 @@ void set_time(time_t t);
|
|||
|
||||
/** Attach an external RTC to be used for the C time functions
|
||||
*
|
||||
* Do not call this function from an interrupt while an RTC read/write operation may be occurring
|
||||
* @Note Synchronization level: Thread safe
|
||||
*
|
||||
* @param read_rtc pointer to function which returns current UNIX timestamp
|
||||
* @param write_rtc pointer to function which sets current UNIX timestamp, can be NULL
|
||||
|
|
|
|||
Loading…
Reference in New Issue