mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
md: move defines/register defs into separate header for SWIG
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
f9b5d7c52c
commit
8779700d82
@ -1,6 +1,6 @@
|
||||
upm_mixed_module_init (NAME uln200xa
|
||||
DESCRIPTION "Darlington Stepper Driver"
|
||||
C_HDR uln200xa.h
|
||||
C_HDR uln200xa.h uln200xa_defs.h
|
||||
C_SRC uln200xa.c
|
||||
CPP_HDR uln200xa.hpp
|
||||
CPP_SRC uln200xa.cxx
|
||||
|
@ -1,7 +1,7 @@
|
||||
%module javaupm_uln200xa
|
||||
%include "../upm.i"
|
||||
|
||||
%include "uln200xa.h"
|
||||
%include "uln200xa_defs.h"
|
||||
%include "uln200xa.hpp"
|
||||
%{
|
||||
#include "uln200xa.hpp"
|
||||
|
@ -1,7 +1,7 @@
|
||||
%module jsupm_uln200xa
|
||||
%include "../upm.i"
|
||||
|
||||
%include "uln200xa.h"
|
||||
%include "uln200xa_defs.h"
|
||||
%include "uln200xa.hpp"
|
||||
%{
|
||||
#include "uln200xa.hpp"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
%feature("autodoc", "3");
|
||||
|
||||
%include "uln200xa.h"
|
||||
%include "uln200xa_defs.h"
|
||||
%include "uln200xa.hpp"
|
||||
%{
|
||||
#include "uln200xa.hpp"
|
||||
|
@ -29,6 +29,8 @@
|
||||
|
||||
#include <mraa/gpio.h>
|
||||
|
||||
#include "uln200xa_defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -58,14 +60,6 @@ extern "C" {
|
||||
|
||||
} *uln200xa_context;
|
||||
|
||||
/**
|
||||
* Enum to specify the direction of a motor
|
||||
*/
|
||||
typedef enum {
|
||||
ULN200XA_DIR_CW = 0x01,
|
||||
ULN200XA_DIR_CCW = 0x02
|
||||
} ULN200XA_DIRECTION_T;
|
||||
|
||||
/**
|
||||
* ULN200XA constructor
|
||||
*
|
||||
|
41
src/uln200xa/uln200xa_defs.h
Normal file
41
src/uln200xa/uln200xa_defs.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Author: Jon Trulson <jtrulson@ics.com>
|
||||
* Copyright (c) 2016 Intel Corporation.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enum to specify the direction of a motor
|
||||
*/
|
||||
typedef enum {
|
||||
ULN200XA_DIR_CW = 0x01,
|
||||
ULN200XA_DIR_CCW = 0x02
|
||||
} ULN200XA_DIRECTION_T;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user