Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
Base.h
- Committer:
- simon.ford@mbed.co.uk
- Date:
- 2008-04-08
- Revision:
- 0:82220227f4fa
- Child:
- 1:6b7f447ca868
File content as of revision 0:82220227f4fa:
/* mbed Microcontroller Library - Base
* Copyright (c) 2007-2008, sford
*/
#ifndef MBED_BASE_H
#define MBED_BASE_H
#define MBED_BASE_NUM_OBJECTS 128 // max # base objects
#define MBED_BASE_SIZE_NAME 16 // max size of object name, including the null-termination
#include "rt_sys.h"
namespace mbed {
class Base {
public:
Base();
virtual ~Base();
void name(const char* name);
const char* name();
const char* type();
static Base* lookup(const char* name);
virtual FILEHANDLE sys_open(const char* name, int openmode);
protected:
const char* _type; // The class type
char _name[MBED_BASE_SIZE_NAME]; // The class instance name
static int _uid; // The counter used to generate the uid's
static Base* _objects[MBED_BASE_NUM_OBJECTS]; // Pointers to all the objects to enable things like rpc
};
} // namespace mbed
#endif
