Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Typedefs | |
typedef fnet_uint32_t | fnet_cpu_irq_desc_t |
IRQ status descriptor returned by the fnet_cpu_irq_disable() function. Actually it corresponds to the interrupt level mask value. | |
Functions | |
void | fnet_cpu_reset (void) |
Initiates software reset. | |
fnet_cpu_irq_desc_t | fnet_cpu_irq_disable (void) |
Disables all interrupts. | |
void | fnet_cpu_irq_enable (fnet_cpu_irq_desc_t irq_desc) |
Enables interrupts. | |
void | fnet_cpu_serial_putchar (fnet_index_t port_number, fnet_char_t character) |
Writes character to the serial port. | |
fnet_int32_t | fnet_cpu_serial_getchar (fnet_index_t port_number) |
Reads character from the serial port. | |
void | fnet_cpu_serial_init (fnet_index_t port_number, fnet_uint32_t baud_rate) |
Initializes the serial port. | |
void | fnet_cpu_cache_invalidate (void) |
Invalidates CPU-cache memory. | |
fnet_return_t | fnet_cpu_flash_erase (void *flash_addr, fnet_size_t bytes) |
Erases the specified range of the Flash memory. | |
fnet_return_t | fnet_cpu_flash_write (fnet_uint8_t *dest, const fnet_uint8_t *data) |
Writes the specified data to the Flash memory. | |
void | fnet_cpu_isr (void) |
CPU-specific FNET interrupt service routine. |
Detailed Description
The CPU-specific library provides commonly used platform dependent functions. Most of these functions are not used by the FNET, but can be useful for an application.
Typedef Documentation
typedef fnet_uint32_t fnet_cpu_irq_desc_t |
IRQ status descriptor returned by the fnet_cpu_irq_disable() function. Actually it corresponds to the interrupt level mask value.
- See also:
- fnet_cpu_irq_disable(), fnet_cpu_irq_enable()
Definition at line 211 of file fnet_cpu.h.
Function Documentation
void fnet_cpu_cache_invalidate | ( | void | ) |
Invalidates CPU-cache memory.
If the CPU has cache memory, this function invalidates it.
This function is called only if FNET_CFG_CPU_CACHE
is 1
.
fnet_return_t fnet_cpu_flash_erase | ( | void * | flash_addr, |
fnet_size_t | bytes | ||
) |
Erases the specified range of the Flash memory.
- Parameters:
-
flash_addr Address in the Flash to erase from. bytes Number of bytes to erase in the Flash memory.
- See also:
- fnet_cpu_flash_write()
This function attempt to erase the number of bytes
bytes beginning at flash_addr
.
It should be noted that the Flash is block oriented when erasing. It is not possible to erase a few bytes within a page, the whole page will be erased. The flash_addr
parameter may be anywhere within the first page to be erased and flash_addr+
bytes
may be anywhere in the last block to be erased.
fnet_return_t fnet_cpu_flash_write | ( | fnet_uint8_t * | dest, |
const fnet_uint8_t * | data | ||
) |
Writes the specified data to the Flash memory.
- Parameters:
-
dest Destination address in the Flash to write to. data Pointer to the block of data to write to the Flash memory Size of the data block must be equal to FNET_CFG_CPU_FLASH_PROGRAM_SIZE.
- See also:
- fnet_cpu_flash_erase()
This function copies FNET_CFG_CPU_FLASH_PROGRAM_SIZE bytes pointed by data
to the Flash memory pointed by dest
.
fnet_cpu_irq_desc_t fnet_cpu_irq_disable | ( | void | ) |
Disables all interrupts.
- Returns:
- This function returns the current IRQ status defined by fnet_cpu_irq_desc_t.
- See also:
- fnet_cpu_irq_enable()
This function disables all interrupts.
The interrupts can be enabled again by the fnet_cpu_irq_enable() function.
void fnet_cpu_irq_enable | ( | fnet_cpu_irq_desc_t | irq_desc ) |
Enables interrupts.
- Parameters:
-
irq_desc IRQ status descriptor returned by the fnet_cpu_irq_disable() function.
Pass0
value to enable all interrupts.
- See also:
- fnet_cpu_irq_disable()
This function enables interrupts that were disabled by the fnet_cpu_irq_disable function.
The functions can enable all interrupts by passing into it the 0
value.
void fnet_cpu_isr | ( | void | ) |
CPU-specific FNET interrupt service routine.
This is CPU-specific ISR which is executed on every FNET interrupt (from Ethernet and timer module).
It extracts vector number and calls fnet_isr_handler().
void fnet_cpu_reset | ( | void | ) |
Initiates software reset.
This function performs software reset and asserts the external reset (RSTO) pin.
fnet_int32_t fnet_cpu_serial_getchar | ( | fnet_index_t | port_number ) |
Reads character from the serial port.
- Parameters:
-
port_number Serial port number.
- Returns:
- This function returns:
- character received by the serial port.
- FNET_ERR if no character is available.
This function reads character from the serial port defined by port_number
.
void fnet_cpu_serial_init | ( | fnet_index_t | port_number, |
fnet_uint32_t | baud_rate | ||
) |
Initializes the serial port.
- Parameters:
-
port_number Serial port number. baud_rate Baud rate to be set to the serial port.
This function executes the HW initialization of the serial port defined by the port_number
.
void fnet_cpu_serial_putchar | ( | fnet_index_t | port_number, |
fnet_char_t | character | ||
) |
Writes character to the serial port.
- Parameters:
-
port_number Serial port number. character Character to be written to the serial port.
This function writes character
to the serial port defined by port_number
.
Generated on Tue Jul 12 2022 13:55:26 by
