EasyManuals Logo

Atmel SAM4 Series User Manual

Atmel SAM4 Series
26 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #12 background imageLoading...
Page #12 background image
AT07334: SAM4 TWI Master Mode Driver [APPLICATION NOTE]
42274A-MCU-05/2014
12
status_code_t twi_master_write(
Twim * twim,
struct twim_package * package)
Table 4-5. Parameters
Data direction Parameter name Description
[in] twim Base address of the TWIM
[in] package Package information and data
Table 4-6. Return Values
Return value Description
STATUS_OK If all bytes were send successfully
ERR_IO_ERROR NACK received or Bus Arbitration lost
4.4.3 Function twim_clear_status()
Clear the current status of the TWIM.
void twim_clear_status(
Twim * twim,
uint32_t clear_status)
Write the value passed in clear_status to the Status Clear Register. Bits set in clear_status result in setting to zero
the corresponding position in the Status Register. See the appropriate datasheet for more detail.
Table 4-7. Parameters
Data direction Parameter name Description
[in] twim Base address of the TWIM
[in] clear_status The TWIM status
4.4.4 Function twim_default_callback()
TWIM default callback.
void twim_default_callback(
Twim * twim)
Each time a TWI packet is transmitted a callback function is executed. This provides default functionality and is
activated by calling twim_set_callback .
Table 4-8. Parameters
Data direction Parameter name Description
[in] twim Base address of the TWIM
4.4.5 Function twim_disable()
Sets the Master Disable bit of the Control Register, which disables master mode.
void twim_disable(

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel SAM4 Series and is the answer not in the manual?

Atmel SAM4 Series Specifications

General IconGeneral
BrandAtmel
ModelSAM4 Series
CategoryControl Unit
LanguageEnglish