diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 440487e334..8695be5912 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@
Last Updated: February 28, 2015
+Last Updated: April 1, 2015
@@ -30,7 +30,7 @@ 1.0 Introductionup_interrupt_context()
up_disable_irq()
up_enable_irq()
up_prioritize_irq()
- 4.2.20 up_putc()
+ 4.2.19 up_prioritize_irq()
up_putc()
up_addrenv_create()
- 4.5.2 up_addrenv_destroy()
- 4.5.3 up_addrenv_vtext()
- 4.5.4 up_addrenv_vdata()
- 4.5.5 up_addrenv_heapsize()
- 4.5.6 up_addrenv_select()
- 4.5.7 up_addrenv_restore()
- 4.5.8 up_addrenv_clone()
- 4.5.9 up_addrenv_attach()
- 4.5.10 up_addrenv_detach()
- 4.5.11 up_addrenv_ustackalloc()
- 4.5.12 up_addrenv_ustackfree()
- 4.5.13 up_addrenv_vustack()
- 4.5.14 up_addrenv_ustackselect()
- 4.5.15 up_addrenv_kstackalloc()
+ 4.5.1 up_addrenv_create()
up_addrenv_destroy()
up_addrenv_vtext()
up_addrenv_vdata()
up_addrenv_heapsize()
up_addrenv_select()
up_addrenv_restore()
up_addrenv_clone()
up_addrenv_attach()
up_addrenv_detach()
up_addrenv_ustackalloc()
up_addrenv_ustackfree()
up_addrenv_vustack()
up_addrenv_ustackselect()
up_addrenv_kstackalloc()
up_addrenv_kstackfree()
boardctl()
Application Interfaceos_start()
sched_process_timer()
sched_timer_expiration()
- 4.6.5 sched_alarm_expiration()
- 4.6.6 irq_dispatch()
+ 4.7.1 os_start()
sched_process_timer()
sched_timer_expiration()
sched_alarm_expiration()
irq_dispatch()
up_shmat()
up_shmdt()
up_shmat()
up_shmdt()
OK
) on success; a negated errno
value on failure.
-boardctl()
Application InterfaceFunction Prototype:
+
+ include <sys/boardctl.h>
+ int boardctl(unsigned int cmd, uintptr_t arg);
+
+Description:
+
+ In a small embedded system, there will typically be a much greater interaction between application and low-level board features.
+ The canonically correct to implement such interactions is by implementing a character driver and performing the interactions via low level ioctl()
calls.
+ This, however, may not be practical in many cases and will lead to "correct" but awkward implementations.
+
+ boardctl()
is non-standard OS interface to alleviate the problem.
+ It basically circumvents the normal device driver ioctl()
interlace and allows the application to perform direction IOCTL-like calls to the board-specific logic.
+ It is especially useful for setting up board operational and test configurations.
+
+ NOTE: The other interfaces described in this document are internal OS interface.
+ boardctl()
is an application interface to the OS.
+ There is not point, in fact, of using boardctl()
within the OS;
+ the board interfaces prototyped in include/nuttx/board.h
may be called directly from within the OS.
+
+ Application interfaces are described in the NuttX User Guide. + This application interface interface is described here only because it is so non-standard and because it is so closely tied to board porting logic. +
+Input Parameters:
+cmd
: Identifies the board command to be executed.
+ See include/sys/boardctl.h
for the complete list of common board commands.
+ Provisions are made to support non-common, board-specific commands as well.
+ arg
: The argument that accompanies the command.
+ The nature of the argument is determined by the specific command.
+ Returned Value:
+OK
) is returned;
+ -1 (ERROR
) is returned on failure with the errno
variable to to indicate the nature of the failure.
+These are standard interfaces that are exported by the OS for use by the architecture specific logic.
-os_start()
os_start()
To be provided
-To be provided
-sched_process_timer()
sched_process_timer()
Function Prototype: void sched_process_timer(void);
Description.
@@ -3840,7 +3891,7 @@ void lpwork_restorepriority(uint8_t reqprio);
MSEC_PER_TICK
.
sched_timer_expiration()
sched_timer_expiration()
Function Prototype:
#include <nuttx/arch.h> @@ -3863,7 +3914,7 @@ void sched_timer_expiration(void); Base code implementation assumes that this function is called from interrupt handling logic with interrupts disabled. -4.6.5
+sched_alaram_expiration()
4.7.5
sched_alaram_expiration()
Function Prototype:
#include <nuttx/arch.h> @@ -3886,7 +3937,7 @@ void sched_timer_expiration(void); Base code implementation assumes that this function is called from interrupt handling logic with interrupts disabled. -4.6.6
+irq_dispatch()
4.7.6
irq_dispatch()
Function Prototype:
void irq_dispatch(int irq, FAR void *context);
Description. @@ -3895,7 +3946,7 @@ void sched_timer_expiration(void); the appropriate, registered handling logic.
-4.7 Shared Memory
+4.8 Shared Memory
Shared memory interfaces are only available with the NuttX kernel build (
-CONFIG_BUILD_KERNEL=y
). These interfaces support user memory regions that can be shared between multiple user processes. @@ -3904,7 +3955,7 @@ void sched_timer_expiration(void); Those interfaces are described below:4.7.1
+up_shmat()
4.8.1
up_shmat()
Function Prototype:
#include <nuttx/arch.h> @@ -3933,7 +3984,7 @@ int up_shmat(FAR uintptr_t *pages, unsigned int npages, uintptr_t vaddr); Zero (OK
) is returned on success; a negatederrno
value is returned on failure. -4.7.2
+up_shmdt()
4.8.2
up_shmdt()
Function Prototype:
#include <nuttx/arch.h> @@ -3959,7 +4010,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages); Zero (OK
) is returned on success; a negatederrno
value is returned on failure. -4.8 On-Demand Paging
+4.9 On-Demand Paging
The NuttX On-Demand Paging feature permits embedded MCUs with some limited RAM space to execute large programs from some non-random access media. If the platform meets certain requirements, then NuttX can provide on-demand paging: @@ -3968,7 +4019,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages); Please see the NuttX Demand Paging design document for further information.
-4.9 LED Support
+4.10 LED Support
A board architecture may or may not have LEDs. @@ -3978,7 +4029,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages); However, the support provided by each architecture is sufficiently similar that it can be documented here.
-4.9.1 Header Files
+4.10.1 Header Files
LED-related definitions are provided in two header files: @@ -4002,7 +4053,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages);
-4.9.2 LED Definitions
+4.10.2 LED Definitions
The implementation of LED support is very specific to a board architecture. @@ -4066,7 +4117,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages); -
4.9.3 Common LED interfaces
+4.10.3 Common LED interfaces
The
include/nuttx/board.h
has declarations like: