Jump to content



Photo
- - - - -

Revolution-fx V1.0


  • Please log in to reply
47 replies to this topic

#41 AlShikan

AlShikan

    Newbie

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming: C/C++/Objective C/Java

  • Calculators:
    fx-9750 GII (software is fx9860G)

Posted 22 January 2013 - 08:48 PM

thx, already looked there, only Serial_open is explained well... could you post an example? the rest i can solve by my self i think :)

#42 Casimo

Casimo

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 641 posts
  • Gender:Not Telling

Posted 23 January 2013 - 09:41 AM

Here is an example from http://translate.goo...&t=3796&act=url (translated german page).
#include "fxlib.h"
int Serial_BufferedTransmitOneByte( unsigned char );
int Serial_Open( void*sm );
int Serial_Close( int mode );
int Serial_ReadOneByte( unsigned char* );
int AddIn_main(int isAppli, unsigned short OptionNum)
{
   char open_mode[6];
   int xpos=1;
   int xpos2=1;
   unsigned char c, d;
   int i;
  
   open_mode[ 0 ] = 0; // always 0
   open_mode[ 1 ] = 9; // 0=300, 1=600, 2=1200, 3=2400, 4=4800, 5=9600, 6=19200, 7=38400, 8=57600, 9=115200 baud
   open_mode[ 2 ] = 2; // parity: 0=no; 1=odd; 2=even
   open_mode[ 3 ] = 0; // datalength: 0=8 bit; 1=7 bit
   open_mode[ 4 ] = 0; // stop bits: 0=one; 1=two
   open_mode[ 5 ] = 0; // always 0
  
   Serial_Open( &open_mode );
   c = 'A';
   while( IsKeyDown( KEY_CTRL_EXIT ) == 0 ){
	  if ( c++ > 'Z' ) c = 'A';
	  Serial_BufferedTransmitOneByte( c );
	  locate( xpos++, 1 ); PrintC( &c ); PrintC( " " );
	  if ( xpos > 20 ) xpos = 1;
	  for ( i=0; i<1000000; i++ );
	  if ( Serial_ReadOneByte( &d ) == 0 ){
		 locate( xpos2++, 4 ); PrintC( &d ); PrintC( " " );
		 if ( xpos2 > 20 ) xpos2 = 1;
	  }
	  Bdisp_PutDisp_DD();
   }
   Serial_Close( 1 );
   return 1;
}


#43 AlShikan

AlShikan

    Newbie

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming: C/C++/Objective C/Java

  • Calculators:
    fx-9750 GII (software is fx9860G)

Posted 23 January 2013 - 02:02 PM

thx :)

Edited by AlShikan, 23 January 2013 - 04:49 PM.


#44 AlShikan

AlShikan

    Newbie

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming: C/C++/Objective C/Java

  • Calculators:
    fx-9750 GII (software is fx9860G)

Posted 23 January 2013 - 04:49 PM

okay now i got one last problem... how to add a src file? :D in the example, theres written i have to add so sourcecode into SYSCALLS.SRC. sorry for these questions, but this is my first try with syscalls ;)

#45 Casimo

Casimo

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 641 posts
  • Gender:Not Telling

Posted 23 January 2013 - 05:02 PM

Right-click on the window with headers and source files.

#46 AlShikan

AlShikan

    Newbie

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming: C/C++/Objective C/Java

  • Calculators:
    fx-9750 GII (software is fx9860G)

Posted 23 January 2013 - 05:14 PM

ah okay.. fail :D

#47 Casimo

Casimo

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 641 posts
  • Gender:Not Telling

Posted 23 January 2013 - 05:45 PM

You couldn't know that. The firs time I saw system calls in a .src file, I tried to add the code on top of my c program :lol: .

#48 AlShikan

AlShikan

    Newbie

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming: C/C++/Objective C/Java

  • Calculators:
    fx-9750 GII (software is fx9860G)

Posted 23 January 2013 - 07:05 PM

that's what i did :D then i tried to add it into another .c file ;D


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users