Subversion Repositories Programming Utils

Compare Revisions

Ignore whitespace Rev 17 → Rev 18

/JavaSerial/NativeCode/com_rm5248_serial_SerialPort_SerialInputStream.h
File deleted
/JavaSerial/NativeCode/com_rm5248_serial_SerialPort_SerialOutputStream.h
File deleted
/JavaSerial/NativeCode/com_rm5248_serial_SerialInputStream.h
0,0 → 1,31
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_rm5248_serial_SerialInputStream */
 
#ifndef _Included_com_rm5248_serial_SerialInputStream
#define _Included_com_rm5248_serial_SerialInputStream
#ifdef __cplusplus
extern "C" {
#endif
#undef com_rm5248_serial_SerialInputStream_SKIP_BUFFER_SIZE
#define com_rm5248_serial_SerialInputStream_SKIP_BUFFER_SIZE 2048L
/*
* Class: com_rm5248_serial_SerialInputStream
* Method: readByte
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialInputStream_readByte
(JNIEnv *, jobject);
 
/*
* Class: com_rm5248_serial_SerialInputStream
* Method: getAvailable
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialInputStream_getAvailable
(JNIEnv *, jobject);
 
#ifdef __cplusplus
}
#endif
#endif
/JavaSerial/NativeCode/com_rm5248_serial_SerialOutputStream.h
0,0 → 1,21
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_rm5248_serial_SerialOutputStream */
 
#ifndef _Included_com_rm5248_serial_SerialOutputStream
#define _Included_com_rm5248_serial_SerialOutputStream
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_rm5248_serial_SerialOutputStream
* Method: writeByte
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_rm5248_serial_SerialOutputStream_writeByte
(JNIEnv *, jobject, jint);
 
#ifdef __cplusplus
}
#endif
#endif
/JavaSerial/NativeCode/SerialPortImpl.c
44,8 → 44,8
// Local Includes
//
#include "com_rm5248_serial_SerialPort.h"
#include "com_rm5248_serial_SerialPort_SerialInputStream.h"
#include "com_rm5248_serial_SerialPort_SerialOutputStream.h"
#include "com_rm5248_serial_SerialInputStream.h"
#include "com_rm5248_serial_SerialOutputStream.h"
 
//
// Struct Definitions
78,7 → 78,7
return -1;
}
 
array_pos = (*env)->GetIntField( env, cls, fid );
array_pos = (*env)->GetIntField( env, obj, fid );
 
return array_pos;
}
256,9 → 256,9
}
}
 
//Search thru the port_list, find the first one that's not NULL
//Search thru the port_list, find the first one that is NULL
for( list_pos = 0; list_pos < port_list_size; ++list_pos ){
if( port_list[ list_pos ] != NULL ){
if( port_list[ list_pos ] == NULL ){
found = 1;
break;
}
420,6 → 420,9
struct port_descriptor* desc;
 
array_pos = get_handle( env, obj );
if( array_pos < 0 || array_pos > port_list_size ){
return;
}
 
desc = port_list[ array_pos ];
if( desc == NULL ){
498,11 → 501,11
//
 
/*
* Class: com_rm5248_serial_SerialPort_SerialInputStream
* Class: com_rm5248_serial_SerialInputStream
* Method: readByte
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialPort_00024SerialInputStream_readByte
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialInputStream_readByte
(JNIEnv * env, jobject obj){
int stat;
char ret_val;
549,11 → 552,11
}
 
/*
* Class: com_rm5248_serial_SerialPort_SerialInputStream
* Class: com_rm5248_serial_SerialInputStream
* Method: getAvailable
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialPort_00024SerialInputStream_getAvailable
JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialInputStream_getAvailable
(JNIEnv * env, jobject obj){
jint ret_val;
jint array_pos;
598,11 → 601,11
}
 
/*
* Class: com_rm5248_serial_SerialPort_SerialOutputStream
* Class: com_rm5248_serial_SerialOutputStream
* Method: writeByte
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_rm5248_serial_SerialPort_00024SerialOutputStream_writeByte
JNIEXPORT void JNICALL Java_com_rm5248_serial_SerialOutputStream_writeByte
(JNIEnv * env, jobject obj, jint byte){
struct port_descriptor* desc;
jint array_pos;
/JavaSerial/NativeCode/Makefile
72,8 → 72,8
#
 
SerialPortImpl.o: SerialPortImpl.c com_rm5248_serial_SerialPort.h \
com_rm5248_serial_SerialPort_SerialInputStream.h \
com_rm5248_serial_SerialPort_SerialOutputStream.h
com_rm5248_serial_SerialInputStream.h \
com_rm5248_serial_SerialOutputStream.h
 
#
# Installation Targets