diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-18 23:35:04 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-18 23:40:28 +0300 |
commit | 3fecbb246238148f83500fb0853ceaa2c3d49fa2 (patch) | |
tree | 7d22d5b1acc1e21dcebea5c47f3549950015be0a /extmod/machine_pinbase.h | |
parent | 2b6dcdd3e451787d47fba7666ed5f4a2877f9338 (diff) | |
download | micropython-3fecbb246238148f83500fb0853ceaa2c3d49fa2.tar.gz micropython-3fecbb246238148f83500fb0853ceaa2c3d49fa2.zip |
extmod/machine_pinbase: Implementation of PinBase class.
Allows to translate C-level pin API to Python-level pin API. In other
words, allows to implement a pin class and Python which will be usable
for efficient C-coded algorithms, like bitbanging SPI/I2C, time_pulse,
etc.
Diffstat (limited to 'extmod/machine_pinbase.h')
-rw-r--r-- | extmod/machine_pinbase.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extmod/machine_pinbase.h b/extmod/machine_pinbase.h new file mode 100644 index 0000000000..ece3384cc6 --- /dev/null +++ b/extmod/machine_pinbase.h @@ -0,0 +1,35 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Paul Sokolovsky + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + +#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__ +#define __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__ + +#include "py/obj.h" + +extern const mp_obj_type_t machine_pinbase_type; + +#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__ |