ATmega328p
Hardware definitions
Loading...
Searching...
No Matches
TWI.h File Reference

Two-wire interface status codes and bus limits. More...

#include <stdint.h>
#include "Config.h"
#include "Pin.h"
Include dependency graph for TWI.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  atmega328p
 Device-specific definitions for the ATmega328P.
namespace  atmega328p::twi
 Two-wire interface definitions.

Enumerations

enum class  atmega328p::twi::Prescaler : uint8_t { atmega328p::twi::Divide1 = 1 , atmega328p::twi::Divide4 = 4 , atmega328p::twi::Divide16 = 16 , atmega328p::twi::Divide64 = 64 }
 TWI clock prescaler values. More...
enum class  atmega328p::twi::StatusCode : uint8_t {
  atmega328p::twi::BusError = 0x00 , atmega328p::twi::StartTransmitted = 0x08 , atmega328p::twi::RepeatedStartTransmitted = 0x10 , atmega328p::twi::AddressWriteAck = 0x18 ,
  atmega328p::twi::AddressWriteNack = 0x20 , atmega328p::twi::DataWriteAck = 0x28 , atmega328p::twi::DataWriteNack = 0x30 , atmega328p::twi::ArbitrationLost = 0x38 ,
  atmega328p::twi::AddressReadAck = 0x40 , atmega328p::twi::AddressReadNack = 0x48 , atmega328p::twi::DataReadAck = 0x50 , atmega328p::twi::DataReadNack = 0x58 ,
  atmega328p::twi::OwnAddressWriteAck = 0x60 , atmega328p::twi::ArbitrationLostOwnAddressWriteAck = 0x68 , atmega328p::twi::GeneralCallAck = 0x70 , atmega328p::twi::ArbitrationLostGeneralCallAck = 0x78 ,
  atmega328p::twi::OwnAddressDataAck = 0x80 , atmega328p::twi::OwnAddressDataNack = 0x88 , atmega328p::twi::GeneralCallDataAck = 0x90 , atmega328p::twi::GeneralCallDataNack = 0x98 ,
  atmega328p::twi::StopOrRepeatedStartReceived = 0xA0 , atmega328p::twi::OwnAddressReadAck = 0xA8 , atmega328p::twi::ArbitrationLostOwnAddressReadAck = 0xB0 , atmega328p::twi::OwnAddressReadDataAck = 0xB8 ,
  atmega328p::twi::OwnAddressReadDataNack = 0xC0 , atmega328p::twi::LastDataByteAck = 0xC8 , atmega328p::twi::NoRelevantStateInformation = 0xF8
}
 TWI bus status codes. More...
enum  : uint8_t {
  atmega328p::twi::module_count = 1U , atmega328p::twi::address_bits = 7U , atmega328p::twi::address_count = 128U , atmega328p::twi::prescaler_count = 4U ,
  atmega328p::twi::sda_pin_value = 0x14U , atmega328p::twi::scl_pin_value = 0x15U , atmega328p::twi::supports_master = 1 , atmega328p::twi::supports_slave = 1 ,
  atmega328p::twi::supports_multi_master_arbitration = 1 , atmega328p::twi::supports_general_call = 1 , atmega328p::twi::cpu_clock_must_exceed_max_of_16x_scl_and_250khz = 1
}
enum  : uint16_t { atmega328p::twi::min_cpu_clocks_per_scl_in_slave_mode = 16U }
 TWI timing limits. More...
enum  : uint32_t { atmega328p::twi::min_cpu_clock_hz = 250000UL , atmega328p::twi::standard_mode_max_hz = 100000UL , atmega328p::twi::fast_mode_max_hz = 400000UL }

Detailed Description

Two-wire interface status codes and bus limits.