[Gambas-user] Declaring external C libraries
Christer Johansson
lists at ...2828...
Fri Aug 3 09:31:24 CEST 2012
> uint8_t is a type as specified by the _t in the naming. u = unsigned
> and int = integer 8 = eight bits. So this declares an unsigned integer
> of 8 bits.
Thanks for the clarification Randall but question remains, how should I
declare a uint8_t in Gambas3 when using the EXTERN command?
The only byte sized datatypes in Gambas3 are Boolean and Byte and Boolean is
clearly not the one to use since it's only TRUE/FALSE but using Byte as
below
give a "Segmentation Fault" when calling the function in libbcm2835.
' Declare shared library
Public Extern bcm2835_gpio_set(pin As Byte) In "libbcm2835"
' Call the function
bcm2835_gpio_set(17)
/CJ
More information about the User
mailing list