Classes | Macros | Typedefs | Enumerations | Functions
ydef.h File Reference
#include "yversion.h"
Include dependency graph for ydef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Notification_child
 
struct  Notification_firmware
 
struct  Notification_funcname
 
struct  Notification_funcnameydx
 
struct  Notification_funcval
 
union  Notification_funydx
 
struct  Notification_header
 
struct  Notification_name
 
struct  Notification_prodinfo
 
struct  Notification_small
 
struct  Notification_tiny
 
struct  SAFE_U16
 
union  USB_Conf_Pkt
 
union  USB_Meta_Pkt
 
union  USB_Notify_Pkt
 
union  USB_Packet
 
union  USB_Prog_Packet
 
struct  USB_Report_Pkt_V1
 
struct  USB_Report_Pkt_V2
 
union  WSStreamHead
 
struct  yDeviceSt
 
union  yFirmwareSt
 
struct  YSTREAM_Head
 

Macros

#define _FAR
 
#define ADDRESSOF(x)   (&(x))
 
#define ERASE_BLOCK_SIZE_BADDR   (ERASE_BLOCK_SIZE_INSTR*2)
 
#define ERASE_BLOCK_SIZE_INSTR   512
 
#define FAMILY_PIC24FJ256DA210   0X41
 
#define FAMILY_PIC24FJ64GB004   0x42
 
#define FROM_SAFE_U16(safe, unsafe)   {(unsafe) = (safe).low |((u16)((safe).high)<<8);}
 
#define GET_PROG_POS_PAGENO(PKT_EXT, PAGENO, POS)
 
#define INTEL_U16(NUM)   (NUM)
 
#define INTEL_U32(NUM)   (NUM)
 
#define INVALID_BLK_HDL   0 /* To use for yBlkHdl type */
 
#define INVALID_HASH_IDX   -1 /* To use for yHash, yStrRef, yApiRef types */
 
#define INVALID_YHANDLE   (-1)
 
#define JEDEC_SPANSION_4MB   0x16
 
#define JEDEC_SPANSION_8MB   0x17
 
#define MAX_ASYNC_TCPCHAN   4
 
#define MAX_BYTE_IN_PACKET   (60)
 
#define MAX_INSTR_IN_PACKET   (MAX_BYTE_IN_PACKET/3)
 
#define Nop()
 
#define NOTIFY_1STBYTE_MAXTINY   63
 
#define NOTIFY_1STBYTE_MINSMALL   128
 
#define NOTIFY_NETPKT_CHILD   '2'
 
#define NOTIFY_NETPKT_DEVLOGYDX   'w'
 
#define NOTIFY_NETPKT_FIRMWARE   '3'
 
#define NOTIFY_NETPKT_FLUSHV2YDX   't'
 
#define NOTIFY_NETPKT_FUNCNAME   '4'
 
#define NOTIFY_NETPKT_FUNCNAMEYDX   '8'
 
#define NOTIFY_NETPKT_FUNCV2YDX   'u'
 
#define NOTIFY_NETPKT_FUNCVAL   '5'
 
#define NOTIFY_NETPKT_FUNCVALYDX   'y'
 
#define NOTIFY_NETPKT_LOG   '7'
 
#define NOTIFY_NETPKT_MAX_LEN   (NOTIFY_NETPKT_START_LEN+1+YOCTO_SERIAL_LEN+1+YOCTO_FUNCTION_LEN+1+YOCTO_LOGICAL_LEN+1+1)
 
#define NOTIFY_NETPKT_NAME   '0'
 
#define NOTIFY_NETPKT_NOT_SYNC   '@'
 
#define NOTIFY_NETPKT_PRODINFO   '9'
 
#define NOTIFY_NETPKT_PRODNAME   '1'
 
#define NOTIFY_NETPKT_SEP   ','
 
#define NOTIFY_NETPKT_START   "YN01"
 
#define NOTIFY_NETPKT_START_LEN   4
 
#define NOTIFY_NETPKT_STOP   '\n'
 
#define NOTIFY_NETPKT_STREAMREADY   '6'
 
#define NOTIFY_NETPKT_TIMEAVGYDX   'z'
 
#define NOTIFY_NETPKT_TIMEV2YDX   'v'
 
#define NOTIFY_NETPKT_TIMEVALYDX   'x'
 
#define NOTIFY_NETPKT_VERSION   "01"
 
#define NOTIFY_PKT_CHILD   2
 
#define NOTIFY_PKT_CHILD_LEN   (sizeof(Notification_header) + sizeof(Notification_child))
 
#define NOTIFY_PKT_FIRMWARE   3
 
#define NOTIFY_PKT_FIRMWARE_LEN   (sizeof(Notification_header) + sizeof(Notification_firmware))
 
#define NOTIFY_PKT_FUNCNAME   4
 
#define NOTIFY_PKT_FUNCNAME_LEN   (sizeof(Notification_header) + sizeof(Notification_funcname))
 
#define NOTIFY_PKT_FUNCNAMEYDX   8
 
#define NOTIFY_PKT_FUNCNAMEYDX_LEN   (sizeof(Notification_header) + sizeof(Notification_funcnameydx))
 
#define NOTIFY_PKT_FUNCVAL   5
 
#define NOTIFY_PKT_FUNCVAL_LEN   (sizeof(Notification_header) + sizeof(Notification_funcval))
 
#define NOTIFY_PKT_LOG   7
 
#define NOTIFY_PKT_LOG_LEN   (sizeof(Notification_header) + sizeof(u8))
 
#define NOTIFY_PKT_NAME   0
 
#define NOTIFY_PKT_NAME_LEN   (sizeof(Notification_header) + sizeof(Notification_name))
 
#define NOTIFY_PKT_PRODINFO   9
 
#define NOTIFY_PKT_PRODINFO_LEN   (sizeof(Notification_header) + sizeof(Notification_prodinfo))
 
#define NOTIFY_PKT_PRODNAME   1
 
#define NOTIFY_PKT_PRODNAME_LEN   (sizeof(Notification_header) + sizeof(Notification_product))
 
#define NOTIFY_PKT_STREAMREADY   6
 
#define NOTIFY_PKT_STREAMREADY_LEN   (sizeof(Notification_header) + sizeof(u8))
 
#define NOTIFY_PKT_TINYVAL_MAXLEN   (sizeof(Notification_tiny) + YOCTO_PUBVAL_SIZE)
 
#define NOTIFY_V2_6RAWBYTES   1
 
#define NOTIFY_V2_FLUSHGROUP   3
 
#define NOTIFY_V2_LEGACY   0
 
#define NOTIFY_V2_TYPEDDATA   2
 
#define PIC24FJ128DA106   0x09
 
#define PIC24FJ128DA110   0x0B
 
#define PIC24FJ128DA206   0x08
 
#define PIC24FJ128DA210   0x0A
 
#define PIC24FJ256DA106   0x0D
 
#define PIC24FJ256DA110   0x0F
 
#define PIC24FJ256DA206   0x0C
 
#define PIC24FJ256DA210   0x0E
 
#define PIC24FJ32GB002   0x03
 
#define PIC24FJ32GB004   0x0B
 
#define PIC24FJ64GB002   0x07
 
#define PIC24FJ64GB004   0x0F
 
#define PORTMAPPER_PORT   111
 
#define PROG_ERASE   2
 
#define PROG_INFO   5
 
#define PROG_INFO_EXT   6
 
#define PROG_NOP   0
 
#define PROG_PROG   3
 
#define PROG_REBOOT   1
 
#define PROG_VERIF   4
 
#define PROGRAM_BLOCK_SIZE_BADDR   (PROGRAM_BLOCK_SIZE_INSTR*2)
 
#define PROGRAM_BLOCK_SIZE_INSTR   64
 
#define PTRVAL(x)   (*(x))
 
#define PUBVAL_1RAWBYTE   1
 
#define PUBVAL_2RAWBYTES   2
 
#define PUBVAL_3RAWBYTES   3
 
#define PUBVAL_4RAWBYTES   4
 
#define PUBVAL_5RAWBYTES   5
 
#define PUBVAL_6RAWBYTES   6
 
#define PUBVAL_C_FLOAT   8
 
#define PUBVAL_C_LONG   7
 
#define PUBVAL_LEGACY   0
 
#define PUBVAL_YOCTO_FLOAT_E3   9
 
#define S16(x)   ((s16)(x))
 
#define S32(x)   ((s32)(x))
 
#define S64(x)   ((s64)(x))
 
#define S8(x)   ((s8)(x))
 
#define SET_PROG_POS_PAGENO(PKT_EXT, PAGENO, POS)
 
#define START_APPLICATION_SIGN   0
 
#define START_AUTOFLASHER_SIGN   ('b'| ('F'<<8))
 
#define START_BOOTLOADER_SIGN   ('b'| ('T'<<8))
 
#define TO_SAFE_U16(safe, unsafe)   {(safe).low = (unsafe)&0xff; (safe).high=(unsafe)>>8;}
 
#define U16(x)   ((u16)(x))
 
#define U16ADDR(x)   ((u16 *)&(x))
 
#define U32(x)   ((u32)(x))
 
#define U64(x)   ((u64)(x))
 
#define U8(x)   ((u8)(x))
 
#define U8ADDR(x)   ((u8 *)&(x))
 
#define USB_CONF_RESET   0
 
#define USB_CONF_START   1
 
#define USB_META_ACK_D2H_PACKET   3
 
#define USB_META_ACK_D2H_PACKET_SIZE   2u
 
#define USB_META_ACK_UPLOAD   7
 
#define USB_META_ACK_UPLOAD_SIZE   6u
 
#define USB_META_DLFLUSH   2
 
#define USB_META_DLFLUSH_SIZE   1u
 
#define USB_META_UTCTIME   1
 
#define USB_META_UTCTIME_SIZE   5u
 
#define USB_META_WS_ANNOUNCE   4
 
#define USB_META_WS_ANNOUNCE_SIZE   (8 + YOCTO_SERIAL_LEN)
 
#define USB_META_WS_AUTH_FLAGS_RW   2
 
#define USB_META_WS_AUTH_FLAGS_VALID   1
 
#define USB_META_WS_AUTHENTICATION   5
 
#define USB_META_WS_AUTHENTICATION_SIZE   28u
 
#define USB_META_WS_ERROR   6
 
#define USB_META_WS_ERROR_SIZE   4u
 
#define USB_META_WS_PROTO_V1   1
 
#define USB_META_WS_PROTO_V2   2
 
#define USB_PKT_SIZE   64
 
#define YAPI_HASH_BUF_SIZE   28
 
#define YESC   (27u)
 
#define YIO_10_MINUTES_TCP_TIMEOUT   600000u
 
#define YIO_1_MINUTE_TCP_TIMEOUT   60000u
 
#define YIO_DEFAULT_TCP_TIMEOUT   20000u
 
#define YIO_DEFAULT_USB_TIMEOUT   2000u
 
#define YIO_IDLE_TCP_TIMEOUT   5000u
 
#define YIO_INVALID   0
 
#define YIO_TCP   2
 
#define YIO_TRUNK   4
 
#define YIO_USB   1
 
#define YIO_WS   5
 
#define YIO_YSB   3
 
#define YIOHDL_SIZE   (sizeof(YIOHDL))
 
#define YISERR(retcode)   ((retcode) < 0)
 
#define YOCTO_AKA_YFUNCTION   0
 
#define YOCTO_AKA_YSENSOR   1
 
#define YOCTO_API_VERSION_BCD   0x0110
 
#define YOCTO_API_VERSION_STR   "1.10"
 
#define YOCTO_BASE_SERIAL_LEN   8
 
#define YOCTO_CALIB_TYPE_OFS   30
 
#define YOCTO_DEFAULT_PORT   4444
 
#define YOCTO_DEVID_BOOTLOADER   2
 
#define YOCTO_DEVID_FACTORYBOOT   1
 
#define YOCTO_DEVID_HIGHEST   0xfefe
 
#define YOCTO_ERRMSG_LEN   256
 
#define YOCTO_FIRMWARE_LEN   22
 
#define YOCTO_FUNCTION_LEN   20
 
#define YOCTO_LOGICAL_LEN   20
 
#define YOCTO_MANUFACTURER_LEN   20
 
#define YOCTO_N_BASECLASSES   2
 
#define YOCTO_PRODUCTNAME_LEN   28
 
#define YOCTO_PUBVAL_LEN   16
 
#define YOCTO_PUBVAL_SIZE   6
 
#define YOCTO_REPORT_LEN   9
 
#define YOCTO_SERIAL_LEN   20
 
#define YOCTO_SERIAL_SEED_SIZE   (YOCTO_SERIAL_LEN - YOCTO_BASE_SERIAL_LEN - 1)
 
#define YOCTO_UNIT_LEN   10
 
#define YOCTO_VENDORID   0x24e0
 
#define YOCTO_VXI_PORT   4445
 
#define YOCTO_WEBSOCKET_MAGIC   "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
 
#define YOCTO_WEBSOCKET_MAGIC_LEN   36
 
#define YPKT_CONF   1
 
#define YPKT_STREAM   0
 
#define YPKT_USB_VERSION_BCD   0x0208
 
#define YPKT_USB_VERSION_NO_RETRY_BCD   0x0207
 
#define YPKTNOMSK   (0x7)
 
#define YSSDP_MCAST_ADDR   (0xFAFFFFEF)
 
#define YSSDP_MCAST_ADDR_STR   "239.255.255.250"
 
#define YSSDP_PORT   1900
 
#define YSSDP_URN_YOCTOPUCE   "urn:yoctopuce-com:device:hub:1"
 
#define YSTATIC   static
 
#define YSTREAM_EMPTY   0
 
#define YSTREAM_META   5
 
#define YSTREAM_NOTICE   3
 
#define YSTREAM_NOTICE_V2   7
 
#define YSTREAM_REPORT   4
 
#define YSTREAM_REPORT_V2   6
 
#define YSTREAM_TCP   1
 
#define YSTREAM_TCP_ASYNCCLOSE   9
 
#define YSTREAM_TCP_CLOSE   2
 
#define YSTREAM_TCP_NOTIF   8
 

Typedefs

typedef char Notification_product[YOCTO_PRODUCTNAME_LEN]
 
typedef u32 u31
 
typedef s32 YAPI_DEVICE
 
typedef s32 YAPI_FUNCTION
 
typedef void(* yapiRequestAsyncCallback) (void *context, const u8 *result, u32 resultlen, int retcode, const char *errmsg)
 
typedef void(* yapiRequestProgressCallback) (void *context, u32 acked, u32 totalbytes)
 
typedef u16 yBlkHdl
 
typedef void * yCRITICAL_SECTION
 
typedef s16 yHash
 
typedef void * YIOHDL
 
typedef int YSOCKET
 
typedef yHash yStrRef
 
typedef u32 yTime
 
typedef yHash yUrlRef
 
typedef s32 YUSBDEV
 
typedef s32 YUSBIO
 

Enumerations

enum  YRETCODE {
  YAPI_SUCCESS = 0, YAPI_NOT_INITIALIZED = -1, YAPI_INVALID_ARGUMENT = -2, YAPI_NOT_SUPPORTED = -3,
  YAPI_DEVICE_NOT_FOUND = -4, YAPI_VERSION_MISMATCH = -5, YAPI_DEVICE_BUSY = -6, YAPI_TIMEOUT = -7,
  YAPI_IO_ERROR = -8, YAPI_NO_MORE_DATA = -9, YAPI_EXHAUSTED = -10, YAPI_DOUBLE_ACCES = -11,
  YAPI_UNAUTHORIZED = -12, YAPI_RTC_NOT_READY = -13, YAPI_FILE_NOT_FOUND = -14
}
 

Functions

void yDeleteCriticalSection (yCRITICAL_SECTION *cs)
 
void yEnterCriticalSection (yCRITICAL_SECTION *cs)
 
void yInitializeCriticalSection (yCRITICAL_SECTION *cs)
 
void yLeaveCriticalSection (yCRITICAL_SECTION *cs)
 
int yTryEnterCriticalSection (yCRITICAL_SECTION *cs)
 

Macro Definition Documentation

#define _FAR

Definition at line 285 of file ydef.h.

#define ADDRESSOF (   x)    (&(x))

Definition at line 279 of file ydef.h.

#define ERASE_BLOCK_SIZE_BADDR   (ERASE_BLOCK_SIZE_INSTR*2)

Definition at line 888 of file ydef.h.

#define ERASE_BLOCK_SIZE_INSTR   512

Definition at line 885 of file ydef.h.

#define FAMILY_PIC24FJ256DA210   0X41

Definition at line 1020 of file ydef.h.

#define FAMILY_PIC24FJ64GB004   0x42

Definition at line 1031 of file ydef.h.

#define FROM_SAFE_U16 (   safe,
  unsafe 
)    {(unsafe) = (safe).low |((u16)((safe).high)<<8);}

Definition at line 471 of file ydef.h.

#define GET_PROG_POS_PAGENO (   PKT_EXT,
  PAGENO,
  POS 
)
Value:
{\
POS = (PKT_EXT).dwordpos_lo + ((u32)(PKT_EXT).dwordpos_hi <<8);\
PAGENO = (PKT_EXT).pageno;}

Definition at line 977 of file ydef.h.

#define INTEL_U16 (   NUM)    (NUM)

Definition at line 981 of file ydef.h.

#define INTEL_U32 (   NUM)    (NUM)

Definition at line 982 of file ydef.h.

#define INVALID_BLK_HDL   0 /* To use for yBlkHdl type */

Definition at line 220 of file ydef.h.

#define INVALID_HASH_IDX   -1 /* To use for yHash, yStrRef, yApiRef types */

Definition at line 219 of file ydef.h.

#define INVALID_YHANDLE   (-1)

Definition at line 265 of file ydef.h.

#define JEDEC_SPANSION_4MB   0x16

Definition at line 1038 of file ydef.h.

#define JEDEC_SPANSION_8MB   0x17

Definition at line 1039 of file ydef.h.

#define MAX_ASYNC_TCPCHAN   4

Definition at line 771 of file ydef.h.

#define MAX_BYTE_IN_PACKET   (60)

Definition at line 882 of file ydef.h.

#define MAX_INSTR_IN_PACKET   (MAX_BYTE_IN_PACKET/3)

Definition at line 883 of file ydef.h.

#define Nop ( )

Definition at line 463 of file ydef.h.

#define NOTIFY_1STBYTE_MAXTINY   63

Definition at line 536 of file ydef.h.

#define NOTIFY_1STBYTE_MINSMALL   128

Definition at line 537 of file ydef.h.

#define NOTIFY_NETPKT_CHILD   '2'

Definition at line 674 of file ydef.h.

#define NOTIFY_NETPKT_DEVLOGYDX   'w'

Definition at line 685 of file ydef.h.

#define NOTIFY_NETPKT_FIRMWARE   '3'

Definition at line 675 of file ydef.h.

#define NOTIFY_NETPKT_FLUSHV2YDX   't'

Definition at line 682 of file ydef.h.

#define NOTIFY_NETPKT_FUNCNAME   '4'

Definition at line 676 of file ydef.h.

#define NOTIFY_NETPKT_FUNCNAMEYDX   '8'

Definition at line 680 of file ydef.h.

#define NOTIFY_NETPKT_FUNCV2YDX   'u'

Definition at line 683 of file ydef.h.

#define NOTIFY_NETPKT_FUNCVAL   '5'

Definition at line 677 of file ydef.h.

#define NOTIFY_NETPKT_FUNCVALYDX   'y'

Definition at line 687 of file ydef.h.

#define NOTIFY_NETPKT_LOG   '7'

Definition at line 679 of file ydef.h.

#define NOTIFY_NETPKT_MAX_LEN   (NOTIFY_NETPKT_START_LEN+1+YOCTO_SERIAL_LEN+1+YOCTO_FUNCTION_LEN+1+YOCTO_LOGICAL_LEN+1+1)

Definition at line 696 of file ydef.h.

#define NOTIFY_NETPKT_NAME   '0'

Definition at line 672 of file ydef.h.

#define NOTIFY_NETPKT_NOT_SYNC   '@'

Definition at line 689 of file ydef.h.

#define NOTIFY_NETPKT_PRODINFO   '9'

Definition at line 681 of file ydef.h.

#define NOTIFY_NETPKT_PRODNAME   '1'

Definition at line 673 of file ydef.h.

#define NOTIFY_NETPKT_SEP   ','

Definition at line 695 of file ydef.h.

#define NOTIFY_NETPKT_START   "YN01"

Definition at line 692 of file ydef.h.

#define NOTIFY_NETPKT_START_LEN   4

Definition at line 693 of file ydef.h.

#define NOTIFY_NETPKT_STOP   '\n'

Definition at line 694 of file ydef.h.

#define NOTIFY_NETPKT_STREAMREADY   '6'

Definition at line 678 of file ydef.h.

#define NOTIFY_NETPKT_TIMEAVGYDX   'z'

Definition at line 688 of file ydef.h.

#define NOTIFY_NETPKT_TIMEV2YDX   'v'

Definition at line 684 of file ydef.h.

#define NOTIFY_NETPKT_TIMEVALYDX   'x'

Definition at line 686 of file ydef.h.

#define NOTIFY_NETPKT_VERSION   "01"

Definition at line 691 of file ydef.h.

#define NOTIFY_PKT_CHILD   2

Definition at line 541 of file ydef.h.

#define NOTIFY_PKT_CHILD_LEN   (sizeof(Notification_header) + sizeof(Notification_child))

Definition at line 701 of file ydef.h.

#define NOTIFY_PKT_FIRMWARE   3

Definition at line 542 of file ydef.h.

#define NOTIFY_PKT_FIRMWARE_LEN   (sizeof(Notification_header) + sizeof(Notification_firmware))

Definition at line 702 of file ydef.h.

#define NOTIFY_PKT_FUNCNAME   4

Definition at line 543 of file ydef.h.

#define NOTIFY_PKT_FUNCNAME_LEN   (sizeof(Notification_header) + sizeof(Notification_funcname))

Definition at line 705 of file ydef.h.

#define NOTIFY_PKT_FUNCNAMEYDX   8

Definition at line 547 of file ydef.h.

#define NOTIFY_PKT_FUNCNAMEYDX_LEN   (sizeof(Notification_header) + sizeof(Notification_funcnameydx))

Definition at line 707 of file ydef.h.

#define NOTIFY_PKT_FUNCVAL   5

Definition at line 544 of file ydef.h.

#define NOTIFY_PKT_FUNCVAL_LEN   (sizeof(Notification_header) + sizeof(Notification_funcval))

Definition at line 706 of file ydef.h.

#define NOTIFY_PKT_LOG   7

Definition at line 546 of file ydef.h.

#define NOTIFY_PKT_LOG_LEN   (sizeof(Notification_header) + sizeof(u8))

Definition at line 704 of file ydef.h.

#define NOTIFY_PKT_NAME   0

Definition at line 539 of file ydef.h.

#define NOTIFY_PKT_NAME_LEN   (sizeof(Notification_header) + sizeof(Notification_name))

Definition at line 698 of file ydef.h.

#define NOTIFY_PKT_PRODINFO   9

Definition at line 548 of file ydef.h.

#define NOTIFY_PKT_PRODINFO_LEN   (sizeof(Notification_header) + sizeof(Notification_prodinfo))

Definition at line 700 of file ydef.h.

#define NOTIFY_PKT_PRODNAME   1

Definition at line 540 of file ydef.h.

#define NOTIFY_PKT_PRODNAME_LEN   (sizeof(Notification_header) + sizeof(Notification_product))

Definition at line 699 of file ydef.h.

#define NOTIFY_PKT_STREAMREADY   6

Definition at line 545 of file ydef.h.

#define NOTIFY_PKT_STREAMREADY_LEN   (sizeof(Notification_header) + sizeof(u8))

Definition at line 703 of file ydef.h.

#define NOTIFY_PKT_TINYVAL_MAXLEN   (sizeof(Notification_tiny) + YOCTO_PUBVAL_SIZE)

Definition at line 708 of file ydef.h.

#define NOTIFY_V2_6RAWBYTES   1

Definition at line 551 of file ydef.h.

#define NOTIFY_V2_FLUSHGROUP   3

Definition at line 553 of file ydef.h.

#define NOTIFY_V2_LEGACY   0

Definition at line 550 of file ydef.h.

#define NOTIFY_V2_TYPEDDATA   2

Definition at line 552 of file ydef.h.

#define PIC24FJ128DA106   0x09

Definition at line 1022 of file ydef.h.

#define PIC24FJ128DA110   0x0B

Definition at line 1024 of file ydef.h.

#define PIC24FJ128DA206   0x08

Definition at line 1021 of file ydef.h.

#define PIC24FJ128DA210   0x0A

Definition at line 1023 of file ydef.h.

#define PIC24FJ256DA106   0x0D

Definition at line 1026 of file ydef.h.

#define PIC24FJ256DA110   0x0F

Definition at line 1028 of file ydef.h.

#define PIC24FJ256DA206   0x0C

Definition at line 1025 of file ydef.h.

#define PIC24FJ256DA210   0x0E

Definition at line 1027 of file ydef.h.

#define PIC24FJ32GB002   0x03

Definition at line 1032 of file ydef.h.

#define PIC24FJ32GB004   0x0B

Definition at line 1034 of file ydef.h.

#define PIC24FJ64GB002   0x07

Definition at line 1033 of file ydef.h.

#define PIC24FJ64GB004   0x0F

Definition at line 1035 of file ydef.h.

#define PORTMAPPER_PORT   111

Definition at line 410 of file ydef.h.

#define PROG_ERASE   2

Definition at line 876 of file ydef.h.

#define PROG_INFO   5

Definition at line 879 of file ydef.h.

#define PROG_INFO_EXT   6

Definition at line 880 of file ydef.h.

#define PROG_NOP   0

Definition at line 874 of file ydef.h.

#define PROG_PROG   3

Definition at line 877 of file ydef.h.

#define PROG_REBOOT   1

Definition at line 875 of file ydef.h.

#define PROG_VERIF   4

Definition at line 878 of file ydef.h.

#define PROGRAM_BLOCK_SIZE_BADDR   (PROGRAM_BLOCK_SIZE_INSTR*2)

Definition at line 889 of file ydef.h.

#define PROGRAM_BLOCK_SIZE_INSTR   64

Definition at line 886 of file ydef.h.

#define PTRVAL (   x)    (*(x))

Definition at line 280 of file ydef.h.

#define PUBVAL_1RAWBYTE   1

Definition at line 558 of file ydef.h.

#define PUBVAL_2RAWBYTES   2

Definition at line 559 of file ydef.h.

#define PUBVAL_3RAWBYTES   3

Definition at line 560 of file ydef.h.

#define PUBVAL_4RAWBYTES   4

Definition at line 561 of file ydef.h.

#define PUBVAL_5RAWBYTES   5

Definition at line 562 of file ydef.h.

#define PUBVAL_6RAWBYTES   6

Definition at line 563 of file ydef.h.

#define PUBVAL_C_FLOAT   8

Definition at line 565 of file ydef.h.

#define PUBVAL_C_LONG   7

Definition at line 564 of file ydef.h.

#define PUBVAL_LEGACY   0

Definition at line 557 of file ydef.h.

#define PUBVAL_YOCTO_FLOAT_E3   9

Definition at line 566 of file ydef.h.

#define S16 (   x)    ((s16)(x))

Definition at line 268 of file ydef.h.

#define S32 (   x)    ((s32)(x))

Definition at line 269 of file ydef.h.

#define S64 (   x)    ((s64)(x))

Definition at line 270 of file ydef.h.

#define S8 (   x)    ((s8)(x))

Definition at line 267 of file ydef.h.

#define SET_PROG_POS_PAGENO (   PKT_EXT,
  PAGENO,
  POS 
)
Value:
{\
(PKT_EXT).dwordpos_lo = (POS) & 0xff;\
(PKT_EXT).dwordpos_hi = ((POS) >> 8) & 3;\
(PKT_EXT).pageno = (PAGENO) & 0x3fff;}

Definition at line 973 of file ydef.h.

#define START_APPLICATION_SIGN   0

Definition at line 998 of file ydef.h.

#define START_AUTOFLASHER_SIGN   ('b'| ('F'<<8))

Definition at line 1000 of file ydef.h.

#define START_BOOTLOADER_SIGN   ('b'| ('T'<<8))

Definition at line 999 of file ydef.h.

#define TO_SAFE_U16 (   safe,
  unsafe 
)    {(safe).low = (unsafe)&0xff; (safe).high=(unsafe)>>8;}

Definition at line 470 of file ydef.h.

#define U16 (   x)    ((u16)(x))

Definition at line 272 of file ydef.h.

#define U16ADDR (   x)    ((u16 *)&(x))

Definition at line 277 of file ydef.h.

#define U32 (   x)    ((u32)(x))

Definition at line 273 of file ydef.h.

#define U64 (   x)    ((u64)(x))

Definition at line 274 of file ydef.h.

#define U8 (   x)    ((u8)(x))

Definition at line 271 of file ydef.h.

#define U8ADDR (   x)    ((u8 *)&(x))

Definition at line 276 of file ydef.h.

#define USB_CONF_RESET   0

Definition at line 503 of file ydef.h.

#define USB_CONF_START   1

Definition at line 504 of file ydef.h.

#define USB_META_ACK_D2H_PACKET   3

Definition at line 778 of file ydef.h.

#define USB_META_ACK_D2H_PACKET_SIZE   2u

Definition at line 786 of file ydef.h.

#define USB_META_ACK_UPLOAD   7

Definition at line 782 of file ydef.h.

#define USB_META_ACK_UPLOAD_SIZE   6u

Definition at line 790 of file ydef.h.

#define USB_META_DLFLUSH   2

Definition at line 777 of file ydef.h.

#define USB_META_DLFLUSH_SIZE   1u

Definition at line 785 of file ydef.h.

#define USB_META_UTCTIME   1

Definition at line 776 of file ydef.h.

#define USB_META_UTCTIME_SIZE   5u

Definition at line 784 of file ydef.h.

#define USB_META_WS_ANNOUNCE   4

Definition at line 779 of file ydef.h.

#define USB_META_WS_ANNOUNCE_SIZE   (8 + YOCTO_SERIAL_LEN)

Definition at line 787 of file ydef.h.

#define USB_META_WS_AUTH_FLAGS_RW   2

Definition at line 796 of file ydef.h.

#define USB_META_WS_AUTH_FLAGS_VALID   1

Definition at line 795 of file ydef.h.

#define USB_META_WS_AUTHENTICATION   5

Definition at line 780 of file ydef.h.

#define USB_META_WS_AUTHENTICATION_SIZE   28u

Definition at line 788 of file ydef.h.

#define USB_META_WS_ERROR   6

Definition at line 781 of file ydef.h.

#define USB_META_WS_ERROR_SIZE   4u

Definition at line 789 of file ydef.h.

#define USB_META_WS_PROTO_V1   1

Definition at line 792 of file ydef.h.

#define USB_META_WS_PROTO_V2   2

Definition at line 793 of file ydef.h.

#define USB_PKT_SIZE   64

Definition at line 467 of file ydef.h.

#define YAPI_HASH_BUF_SIZE   28

Definition at line 406 of file ydef.h.

#define YESC   (27u)

Definition at line 1041 of file ydef.h.

#define YIO_10_MINUTES_TCP_TIMEOUT   600000u

Definition at line 252 of file ydef.h.

#define YIO_1_MINUTE_TCP_TIMEOUT   60000u

Definition at line 251 of file ydef.h.

#define YIO_DEFAULT_TCP_TIMEOUT   20000u

Definition at line 250 of file ydef.h.

#define YIO_DEFAULT_USB_TIMEOUT   2000u

Definition at line 249 of file ydef.h.

#define YIO_IDLE_TCP_TIMEOUT   5000u

Definition at line 253 of file ydef.h.

#define YIO_INVALID   0

Definition at line 242 of file ydef.h.

#define YIO_TCP   2

Definition at line 244 of file ydef.h.

#define YIO_TRUNK   4

Definition at line 246 of file ydef.h.

#define YIO_USB   1

Definition at line 243 of file ydef.h.

#define YIO_WS   5

Definition at line 247 of file ydef.h.

#define YIO_YSB   3

Definition at line 245 of file ydef.h.

#define YIOHDL_SIZE   (sizeof(YIOHDL))

Definition at line 263 of file ydef.h.

#define YISERR (   retcode)    ((retcode) < 0)

Definition at line 394 of file ydef.h.

#define YOCTO_AKA_YFUNCTION   0

Definition at line 413 of file ydef.h.

#define YOCTO_AKA_YSENSOR   1

Definition at line 414 of file ydef.h.

#define YOCTO_API_VERSION_BCD   0x0110

Definition at line 398 of file ydef.h.

#define YOCTO_API_VERSION_STR   "1.10"

Definition at line 397 of file ydef.h.

#define YOCTO_BASE_SERIAL_LEN   8

Definition at line 421 of file ydef.h.

#define YOCTO_CALIB_TYPE_OFS   30

Definition at line 407 of file ydef.h.

#define YOCTO_DEFAULT_PORT   4444

Definition at line 400 of file ydef.h.

#define YOCTO_DEVID_BOOTLOADER   2

Definition at line 404 of file ydef.h.

#define YOCTO_DEVID_FACTORYBOOT   1

Definition at line 403 of file ydef.h.

#define YOCTO_DEVID_HIGHEST   0xfefe

Definition at line 405 of file ydef.h.

#define YOCTO_ERRMSG_LEN   256

Definition at line 418 of file ydef.h.

#define YOCTO_FIRMWARE_LEN   22

Definition at line 423 of file ydef.h.

#define YOCTO_FUNCTION_LEN   20

Definition at line 425 of file ydef.h.

#define YOCTO_LOGICAL_LEN   20

Definition at line 424 of file ydef.h.

#define YOCTO_MANUFACTURER_LEN   20

Definition at line 419 of file ydef.h.

#define YOCTO_N_BASECLASSES   2

Definition at line 415 of file ydef.h.

#define YOCTO_PRODUCTNAME_LEN   28

Definition at line 422 of file ydef.h.

#define YOCTO_PUBVAL_LEN   16

Definition at line 428 of file ydef.h.

#define YOCTO_PUBVAL_SIZE   6

Definition at line 427 of file ydef.h.

#define YOCTO_REPORT_LEN   9

Definition at line 429 of file ydef.h.

#define YOCTO_SERIAL_LEN   20

Definition at line 420 of file ydef.h.

#define YOCTO_SERIAL_SEED_SIZE   (YOCTO_SERIAL_LEN - YOCTO_BASE_SERIAL_LEN - 1)

Definition at line 430 of file ydef.h.

#define YOCTO_UNIT_LEN   10

Definition at line 426 of file ydef.h.

#define YOCTO_VENDORID   0x24e0

Definition at line 402 of file ydef.h.

#define YOCTO_VXI_PORT   4445

Definition at line 401 of file ydef.h.

#define YOCTO_WEBSOCKET_MAGIC   "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"

Definition at line 433 of file ydef.h.

#define YOCTO_WEBSOCKET_MAGIC_LEN   36

Definition at line 434 of file ydef.h.

#define YPKT_CONF   1

Definition at line 497 of file ydef.h.

#define YPKT_STREAM   0

Definition at line 496 of file ydef.h.

#define YPKT_USB_VERSION_BCD   0x0208

Definition at line 469 of file ydef.h.

#define YPKT_USB_VERSION_NO_RETRY_BCD   0x0207

Definition at line 468 of file ydef.h.

#define YPKTNOMSK   (0x7)

Definition at line 480 of file ydef.h.

#define YSSDP_MCAST_ADDR   (0xFAFFFFEF)

Definition at line 860 of file ydef.h.

#define YSSDP_MCAST_ADDR_STR   "239.255.255.250"

Definition at line 859 of file ydef.h.

#define YSSDP_PORT   1900

Definition at line 858 of file ydef.h.

#define YSSDP_URN_YOCTOPUCE   "urn:yoctopuce-com:device:hub:1"

Definition at line 861 of file ydef.h.

#define YSTATIC   static

Definition at line 292 of file ydef.h.

#define YSTREAM_EMPTY   0

Definition at line 523 of file ydef.h.

#define YSTREAM_META   5

Definition at line 528 of file ydef.h.

#define YSTREAM_NOTICE   3

Definition at line 526 of file ydef.h.

#define YSTREAM_NOTICE_V2   7

Definition at line 530 of file ydef.h.

#define YSTREAM_REPORT   4

Definition at line 527 of file ydef.h.

#define YSTREAM_REPORT_V2   6

Definition at line 529 of file ydef.h.

#define YSTREAM_TCP   1

Definition at line 524 of file ydef.h.

#define YSTREAM_TCP_ASYNCCLOSE   9

Definition at line 532 of file ydef.h.

#define YSTREAM_TCP_CLOSE   2

Definition at line 525 of file ydef.h.

#define YSTREAM_TCP_NOTIF   8

Definition at line 531 of file ydef.h.

Typedef Documentation

typedef char Notification_product[YOCTO_PRODUCTNAME_LEN]

Definition at line 616 of file ydef.h.

typedef u32 u31

Definition at line 211 of file ydef.h.

typedef s32 YAPI_DEVICE

Definition at line 216 of file ydef.h.

typedef s32 YAPI_FUNCTION

Definition at line 217 of file ydef.h.

typedef void(* yapiRequestAsyncCallback) (void *context, const u8 *result, u32 resultlen, int retcode, const char *errmsg)

Definition at line 864 of file ydef.h.

typedef void(* yapiRequestProgressCallback) (void *context, u32 acked, u32 totalbytes)

Definition at line 866 of file ydef.h.

typedef u16 yBlkHdl

Definition at line 213 of file ydef.h.

typedef void* yCRITICAL_SECTION

Definition at line 366 of file ydef.h.

typedef s16 yHash

Definition at line 212 of file ydef.h.

typedef void* YIOHDL

Definition at line 260 of file ydef.h.

typedef int YSOCKET

Definition at line 236 of file ydef.h.

typedef yHash yStrRef

Definition at line 214 of file ydef.h.

typedef u32 yTime

Definition at line 210 of file ydef.h.

typedef yHash yUrlRef

Definition at line 215 of file ydef.h.

typedef s32 YUSBDEV

Definition at line 239 of file ydef.h.

typedef s32 YUSBIO

Definition at line 238 of file ydef.h.

Enumeration Type Documentation

enum YRETCODE
Enumerator
YAPI_SUCCESS 
YAPI_NOT_INITIALIZED 
YAPI_INVALID_ARGUMENT 
YAPI_NOT_SUPPORTED 
YAPI_DEVICE_NOT_FOUND 
YAPI_VERSION_MISMATCH 
YAPI_DEVICE_BUSY 
YAPI_TIMEOUT 
YAPI_IO_ERROR 
YAPI_NO_MORE_DATA 
YAPI_EXHAUSTED 
YAPI_DOUBLE_ACCES 
YAPI_UNAUTHORIZED 
YAPI_RTC_NOT_READY 
YAPI_FILE_NOT_FOUND 

Definition at line 376 of file ydef.h.

Function Documentation

void yDeleteCriticalSection ( yCRITICAL_SECTION cs)

Definition at line 682 of file ythread.c.

void yEnterCriticalSection ( yCRITICAL_SECTION cs)

Definition at line 647 of file ythread.c.

void yInitializeCriticalSection ( yCRITICAL_SECTION cs)

Definition at line 629 of file ythread.c.

void yLeaveCriticalSection ( yCRITICAL_SECTION cs)

Definition at line 672 of file ythread.c.

int yTryEnterCriticalSection ( yCRITICAL_SECTION cs)

Definition at line 657 of file ythread.c.



yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:13