APM:Libraries
Classes | Functions
syscalls.h File Reference
#include "stm32f4xx.h"
#include <reent.h>
#include <stdbool.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <hal_types.h>
Include dependency graph for syscalls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  udid
 

Functions

int _kill (int pid, int sig)
 
void _exit (int status)
 
int _getpid (void)
 
static caddr_t get_stack_top (void)
 
caddr_t _sbrk (int nbytes)
 
caddr_t sbrk_ccm (int nbytes)
 
int _open (const char *path, int flags,...)
 
int _close (int fd)
 
int _fstat (int fd, struct stat *st)
 
int _isatty (int fd)
 
int isatty (int fd)
 Test POSIX fileno if it is a Serial Console/TTY. More...
 
int _lseek (int fd, off_t pos, int whence)
 
unsigned char getch (void)
 
int _read (int fd, char *buf, size_t cnt)
 
void putch (unsigned char c)
 
void cgets (char *s, int bufsize)
 
int _write (int fd, const char *buf, size_t cnt)
 
void clock_gettime (uint32_t a1, void *a2)
 
void get_board_serial (uint8_t *serialid)
 
int val_read (void *dest, volatile const void *src, int bytes)
 

Function Documentation

◆ _close()

int _close ( int  fd)

Definition at line 136 of file syscalls.c.

Referenced by __attribute__(), and get_stack_top().

Here is the caller graph for this function:

◆ _exit()

void _exit ( int  status)

Definition at line 54 of file syscalls.c.

Referenced by __attribute__().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _fstat()

int _fstat ( int  fd,
struct stat st 
)

Definition at line 140 of file syscalls.c.

Referenced by __attribute__(), and get_stack_top().

Here is the caller graph for this function:

◆ _getpid()

int _getpid ( void  )

Definition at line 59 of file syscalls.c.

Referenced by __attribute__().

Here is the caller graph for this function:

◆ _isatty()

int _isatty ( int  fd)

Definition at line 145 of file syscalls.c.

Referenced by __attribute__(), and get_stack_top().

Here is the caller graph for this function:

◆ _kill()

int _kill ( int  pid,
int  sig 
)

Definition at line 48 of file syscalls.c.

Referenced by __attribute__().

Here is the caller graph for this function:

◆ _lseek()

int _lseek ( int  fd,
off_t  pos,
int  whence 
)

Definition at line 153 of file syscalls.c.

Referenced by __attribute__(), and get_stack_top().

Here is the caller graph for this function:

◆ _open()

int _open ( const char *  path,
int  flags,
  ... 
)

Definition at line 132 of file syscalls.c.

Referenced by get_stack_top().

Here is the caller graph for this function:

◆ _read()

int _read ( int  fd,
char *  buf,
size_t  cnt 
)

Definition at line 126 of file system.cpp.

Referenced by get_stack_top(), Linux::CAN::RxItem::RxItem(), and AP_HAL::yield().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sbrk()

caddr_t _sbrk ( int  nbytes)

Definition at line 127 of file syscalls.c.

Referenced by __attribute__(), and get_stack_top().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _write()

int _write ( int  fd,
const char *  buf,
size_t  cnt 
)

Definition at line 191 of file syscalls.c.

Referenced by __attribute__(), get_stack_top(), and Linux::CAN::RxItem::RxItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgets()

void cgets ( char *  s,
int  bufsize 
)

Definition at line 158 of file syscalls.c.

Referenced by get_stack_top().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clock_gettime()

void clock_gettime ( uint32_t  a1,
void *  a2 
)

Definition at line 201 of file syscalls.c.

Referenced by get_stack_top().

Here is the caller graph for this function:

◆ get_board_serial()

void get_board_serial ( uint8_t *  serialid)

Definition at line 217 of file syscalls.c.

◆ get_stack_top()

static caddr_t get_stack_top ( void  )
inlinestatic

Definition at line 19 of file syscalls.h.

Referenced by _sbrk_ccm(), and _sbrk_ram().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getch()

unsigned char getch ( void  )

Definition at line 120 of file system.cpp.

Referenced by cgets(), get_stack_top(), and AP_HAL::yield().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isatty()

int isatty ( int  fileno)

Test POSIX fileno if it is a Serial Console/TTY.

  • POSIX character I/O functions
    • man page isatty (3).
Parameters
[in]filenoPOSIX fileno of open file.
Returns
1 if fileno is a serial TTY/Console (uart in avr-libc terms).
0 if POSIX fileno is NOT a Serial TTY.
Todo:
Perhaps we should verify console functions have been added ?

Definition at line 185 of file posix.c.

Referenced by __wrap_fclose(), fileno_to_fatfs(), free_file_descriptor(), ftell(), ftruncate(), get_stack_top(), lseek(), new_file_descriptor(), sync(), and syncfs().

Here is the caller graph for this function:

◆ putch()

void putch ( unsigned char  c)

Definition at line 139 of file system.cpp.

Referenced by _write(), get_stack_top(), and AP_HAL::yield().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sbrk_ccm()

caddr_t sbrk_ccm ( int  nbytes)

Definition at line 121 of file syscalls.c.

Referenced by F4Light::AnalogIn::_create_channel(), get_stack_top(), F4Light::RCInput::init(), and F4Light::Util::malloc_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_read()

int val_read ( void *  dest,
volatile const void *  src,
int  bytes 
)

Definition at line 203 of file syscalls.c.

Referenced by get_board_serial().

Here is the caller graph for this function: