Edited little things
This commit is contained in:
parent
ee2ad1ab9a
commit
c1449a6c9d
8
Makefile
8
Makefile
|
@ -17,7 +17,7 @@ include Makefile.vars
|
|||
# TARGETS
|
||||
## General targets
|
||||
## - Make it all
|
||||
all: lib$(NAME).so.$(VERSION)
|
||||
all: lib$(NAME).so
|
||||
|
||||
## Library-specific targets
|
||||
## - Make a module object directory
|
||||
|
@ -33,7 +33,7 @@ $(foreach mod,$(MODULES), \
|
|||
$(eval $(call make-moduleobj-rule,$(mod))))
|
||||
|
||||
## - Make the dynamic library
|
||||
lib$(NAME).so.$(VERSION): $(ALLOBJ)
|
||||
lib$(NAME).so: $(ALLOBJ)
|
||||
$(LD) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
## - Remove object files
|
||||
|
@ -42,7 +42,7 @@ clean:
|
|||
|
||||
## - Clean and remove final library
|
||||
fclean: clean
|
||||
$(RM) lib$(NAME).a lib$(NAME).so.$(VERSION)
|
||||
$(RM) lib$(NAME).a lib$(NAME).so.$(VERSION) lib$(NAME).so
|
||||
|
||||
## - Remake library
|
||||
re: fclean all
|
||||
|
@ -57,7 +57,7 @@ $(eval $(call make-installinc-rule,$(inc))))
|
|||
|
||||
## - Install library
|
||||
install: $(INCPUB:%=install-$(INCDIR)/%.h)
|
||||
$(INST) -D -m 644 lib$(NAME).so.$(VERSION) $(ILIBDIR)/lib$(NAME).so.$(VERSION)
|
||||
$(INST) -D -m 644 lib$(NAME).so $(ILIBDIR)/lib$(NAME).so.$(VERSION)
|
||||
$(LN) $(ILIBDIR)/lib$(NAME).so.$(VERSION) $(ILIBDIR)/lib$(NAME).so
|
||||
$(if $(INSTALL_UDEV_RULE),$(INST) -D -m 644 udev.rules $(UDEVDIR)/60-casio-usb.rules)
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@ file).
|
|||
As the protocol shouldn't be used in async, I didn't bother making this
|
||||
library thread-safe. It might be in the future, but not right now.
|
||||
|
||||
No interaction is made with main memory right now, it should be implemented
|
||||
when libg1m comes out.
|
||||
|
||||
## Prerequisites
|
||||
### Making-only dependencies
|
||||
|
||||
|
@ -25,8 +28,6 @@ library thread-safe. It might be in the future, but not right now.
|
|||
| -------------------------------------------------- | -------- |
|
||||
| [libusb](http://libusb.info/) | >= 1.0 |
|
||||
|
||||
There are no runtime dependency that I'm aware of.
|
||||
|
||||
## Building
|
||||
|
||||
Just `./configure` then `make`. To install, use `make install`.
|
||||
|
|
|
@ -20,7 +20,7 @@ if (!p7_init()) {
|
|||
return (3);
|
||||
}
|
||||
|
||||
p7_start();
|
||||
p7_start(0);
|
||||
|
||||
FILE *fp = fopen("myaddin.g1a", "r");
|
||||
p7_sendfile(fp, NULL, "myaddin.g1a", "fls0", 1, NULL);
|
||||
|
@ -40,5 +40,7 @@ SEE ALSO
|
|||
*p7_init*(3),
|
||||
*p7_error*(3),
|
||||
*p7_geterror*(3),
|
||||
*p7_start*(3),
|
||||
*p7_term*(3),
|
||||
*p7_sendfile*(3),
|
||||
*p7_reqfile*(3)
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
P7_START(3)
|
||||
===========
|
||||
Thomas "Cakeisalie5" Touhey
|
||||
:Email: thomas@touhey.fr
|
||||
:man source: libp7
|
||||
:man manual: libp7 manual
|
||||
|
||||
NAME
|
||||
----
|
||||
p7_start - initialize communication
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[source,c]
|
||||
----
|
||||
#include <libp7.h>
|
||||
|
||||
int p7_start(int shift);
|
||||
|
||||
int shift = 1;
|
||||
if (!p7_start(shift))
|
||||
return (3);
|
||||
/* ... */
|
||||
if (shift)
|
||||
p7_unshift();
|
||||
p7_term();
|
||||
----
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
Call this function to initialize communication with the calculator.
|
||||
|
||||
Packet shifting is a tricky technique to accelerate transmission (make the
|
||||
calculator answer faster). It must be used in a communication where there are
|
||||
*no interactive parts* and *no roleswapping* - the obvious case (and the really
|
||||
only case I support) is file sending with overwriting (no check and no
|
||||
confirmation).
|
||||
|
||||
If you use packet shifting, you must call *p7_unshift* before terminating
|
||||
communication.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
*libp7*(3),
|
||||
*p7_term*(3)
|
|
@ -0,0 +1,31 @@
|
|||
P7_TERM(3)
|
||||
==========
|
||||
Thomas "Cakeisalie5" Touhey
|
||||
:Email: thomas@touhey.fr
|
||||
:man source: libp7
|
||||
:man manual: libp7 manual
|
||||
|
||||
NAME
|
||||
----
|
||||
p7_term - terminate communication
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[source,c]
|
||||
----
|
||||
#include <libp7.h>
|
||||
|
||||
int p7_term(void);
|
||||
|
||||
p7_term();
|
||||
----
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
Terminates communication. Calculator won't respond anymore after this function
|
||||
has been called. Should be called after *p7_start*(3).
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
*libp7*(3),
|
||||
*p7_start*(3)
|
Reference in New Issue