stm32f7_staging/stm32f779/i2c1/
isr.rs

1///Register `ISR` reader
2pub type R = crate::R<ISRrs>;
3///Register `ISR` writer
4pub type W = crate::W<ISRrs>;
5/**Transmit data register empty (transmitters)
6
7Value on reset: 1*/
8#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum TXER {
11    ///0: TXDR register not empty
12    NotEmpty = 0,
13    ///1: TXDR register empty
14    Empty = 1,
15}
16impl From<TXER> for bool {
17    #[inline(always)]
18    fn from(variant: TXER) -> Self {
19        variant as u8 != 0
20    }
21}
22///Field `TXE` reader - Transmit data register empty (transmitters)
23pub type TXE_R = crate::BitReader<TXER>;
24impl TXE_R {
25    ///Get enumerated values variant
26    #[inline(always)]
27    pub const fn variant(&self) -> TXER {
28        match self.bits {
29            false => TXER::NotEmpty,
30            true => TXER::Empty,
31        }
32    }
33    ///TXDR register not empty
34    #[inline(always)]
35    pub fn is_not_empty(&self) -> bool {
36        *self == TXER::NotEmpty
37    }
38    ///TXDR register empty
39    #[inline(always)]
40    pub fn is_empty(&self) -> bool {
41        *self == TXER::Empty
42    }
43}
44/**Transmit data register empty (transmitters)
45
46Value on reset: 1*/
47#[cfg_attr(feature = "defmt", derive(defmt::Format))]
48#[derive(Clone, Copy, Debug, PartialEq, Eq)]
49pub enum TXEW {
50    ///1: Flush the transmit data register
51    Flush = 1,
52}
53impl From<TXEW> for bool {
54    #[inline(always)]
55    fn from(variant: TXEW) -> Self {
56        variant as u8 != 0
57    }
58}
59///Field `TXE` writer - Transmit data register empty (transmitters)
60pub type TXE_W<'a, REG> = crate::BitWriter1S<'a, REG, TXEW>;
61impl<'a, REG> TXE_W<'a, REG>
62where
63    REG: crate::Writable + crate::RegisterSpec,
64{
65    ///Flush the transmit data register
66    #[inline(always)]
67    pub fn flush(self) -> &'a mut crate::W<REG> {
68        self.variant(TXEW::Flush)
69    }
70}
71/**Transmit interrupt status (transmitters)
72
73Value on reset: 0*/
74#[cfg_attr(feature = "defmt", derive(defmt::Format))]
75#[derive(Clone, Copy, Debug, PartialEq, Eq)]
76pub enum TXISR {
77    ///0: The TXDR register is not empty
78    NotEmpty = 0,
79    ///1: The TXDR register is empty and the data to be transmitted must be written in the TXDR register
80    Empty = 1,
81}
82impl From<TXISR> for bool {
83    #[inline(always)]
84    fn from(variant: TXISR) -> Self {
85        variant as u8 != 0
86    }
87}
88///Field `TXIS` reader - Transmit interrupt status (transmitters)
89pub type TXIS_R = crate::BitReader<TXISR>;
90impl TXIS_R {
91    ///Get enumerated values variant
92    #[inline(always)]
93    pub const fn variant(&self) -> TXISR {
94        match self.bits {
95            false => TXISR::NotEmpty,
96            true => TXISR::Empty,
97        }
98    }
99    ///The TXDR register is not empty
100    #[inline(always)]
101    pub fn is_not_empty(&self) -> bool {
102        *self == TXISR::NotEmpty
103    }
104    ///The TXDR register is empty and the data to be transmitted must be written in the TXDR register
105    #[inline(always)]
106    pub fn is_empty(&self) -> bool {
107        *self == TXISR::Empty
108    }
109}
110/**Transmit interrupt status (transmitters)
111
112Value on reset: 0*/
113#[cfg_attr(feature = "defmt", derive(defmt::Format))]
114#[derive(Clone, Copy, Debug, PartialEq, Eq)]
115pub enum TXISW {
116    ///1: Generate a TXIS event
117    Trigger = 1,
118}
119impl From<TXISW> for bool {
120    #[inline(always)]
121    fn from(variant: TXISW) -> Self {
122        variant as u8 != 0
123    }
124}
125///Field `TXIS` writer - Transmit interrupt status (transmitters)
126pub type TXIS_W<'a, REG> = crate::BitWriter1S<'a, REG, TXISW>;
127impl<'a, REG> TXIS_W<'a, REG>
128where
129    REG: crate::Writable + crate::RegisterSpec,
130{
131    ///Generate a TXIS event
132    #[inline(always)]
133    pub fn trigger(self) -> &'a mut crate::W<REG> {
134        self.variant(TXISW::Trigger)
135    }
136}
137/**Receive data register not empty (receivers)
138
139Value on reset: 0*/
140#[cfg_attr(feature = "defmt", derive(defmt::Format))]
141#[derive(Clone, Copy, Debug, PartialEq, Eq)]
142pub enum RXNE {
143    ///0: The RXDR register is empty
144    Empty = 0,
145    ///1: Received data is copied into the RXDR register, and is ready to be read
146    NotEmpty = 1,
147}
148impl From<RXNE> for bool {
149    #[inline(always)]
150    fn from(variant: RXNE) -> Self {
151        variant as u8 != 0
152    }
153}
154///Field `RXNE` reader - Receive data register not empty (receivers)
155pub type RXNE_R = crate::BitReader<RXNE>;
156impl RXNE_R {
157    ///Get enumerated values variant
158    #[inline(always)]
159    pub const fn variant(&self) -> RXNE {
160        match self.bits {
161            false => RXNE::Empty,
162            true => RXNE::NotEmpty,
163        }
164    }
165    ///The RXDR register is empty
166    #[inline(always)]
167    pub fn is_empty(&self) -> bool {
168        *self == RXNE::Empty
169    }
170    ///Received data is copied into the RXDR register, and is ready to be read
171    #[inline(always)]
172    pub fn is_not_empty(&self) -> bool {
173        *self == RXNE::NotEmpty
174    }
175}
176/**Address matched (slave mode)
177
178Value on reset: 0*/
179#[cfg_attr(feature = "defmt", derive(defmt::Format))]
180#[derive(Clone, Copy, Debug, PartialEq, Eq)]
181pub enum ADDR {
182    ///0: Adress mismatched or not received
183    NotMatch = 0,
184    ///1: Received slave address matched with one of the enabled slave addresses
185    Match = 1,
186}
187impl From<ADDR> for bool {
188    #[inline(always)]
189    fn from(variant: ADDR) -> Self {
190        variant as u8 != 0
191    }
192}
193///Field `ADDR` reader - Address matched (slave mode)
194pub type ADDR_R = crate::BitReader<ADDR>;
195impl ADDR_R {
196    ///Get enumerated values variant
197    #[inline(always)]
198    pub const fn variant(&self) -> ADDR {
199        match self.bits {
200            false => ADDR::NotMatch,
201            true => ADDR::Match,
202        }
203    }
204    ///Adress mismatched or not received
205    #[inline(always)]
206    pub fn is_not_match(&self) -> bool {
207        *self == ADDR::NotMatch
208    }
209    ///Received slave address matched with one of the enabled slave addresses
210    #[inline(always)]
211    pub fn is_match(&self) -> bool {
212        *self == ADDR::Match
213    }
214}
215/**Not acknowledge received flag
216
217Value on reset: 0*/
218#[cfg_attr(feature = "defmt", derive(defmt::Format))]
219#[derive(Clone, Copy, Debug, PartialEq, Eq)]
220pub enum NACKF {
221    ///0: No NACK has been received
222    NoNack = 0,
223    ///1: NACK has been received
224    Nack = 1,
225}
226impl From<NACKF> for bool {
227    #[inline(always)]
228    fn from(variant: NACKF) -> Self {
229        variant as u8 != 0
230    }
231}
232///Field `NACKF` reader - Not acknowledge received flag
233pub type NACKF_R = crate::BitReader<NACKF>;
234impl NACKF_R {
235    ///Get enumerated values variant
236    #[inline(always)]
237    pub const fn variant(&self) -> NACKF {
238        match self.bits {
239            false => NACKF::NoNack,
240            true => NACKF::Nack,
241        }
242    }
243    ///No NACK has been received
244    #[inline(always)]
245    pub fn is_no_nack(&self) -> bool {
246        *self == NACKF::NoNack
247    }
248    ///NACK has been received
249    #[inline(always)]
250    pub fn is_nack(&self) -> bool {
251        *self == NACKF::Nack
252    }
253}
254/**Stop detection flag
255
256Value on reset: 0*/
257#[cfg_attr(feature = "defmt", derive(defmt::Format))]
258#[derive(Clone, Copy, Debug, PartialEq, Eq)]
259pub enum STOPF {
260    ///0: No Stop condition detected
261    NoStop = 0,
262    ///1: Stop condition detected
263    Stop = 1,
264}
265impl From<STOPF> for bool {
266    #[inline(always)]
267    fn from(variant: STOPF) -> Self {
268        variant as u8 != 0
269    }
270}
271///Field `STOPF` reader - Stop detection flag
272pub type STOPF_R = crate::BitReader<STOPF>;
273impl STOPF_R {
274    ///Get enumerated values variant
275    #[inline(always)]
276    pub const fn variant(&self) -> STOPF {
277        match self.bits {
278            false => STOPF::NoStop,
279            true => STOPF::Stop,
280        }
281    }
282    ///No Stop condition detected
283    #[inline(always)]
284    pub fn is_no_stop(&self) -> bool {
285        *self == STOPF::NoStop
286    }
287    ///Stop condition detected
288    #[inline(always)]
289    pub fn is_stop(&self) -> bool {
290        *self == STOPF::Stop
291    }
292}
293/**Transfer Complete (master mode)
294
295Value on reset: 0*/
296#[cfg_attr(feature = "defmt", derive(defmt::Format))]
297#[derive(Clone, Copy, Debug, PartialEq, Eq)]
298pub enum TC {
299    ///0: Transfer is not complete
300    NotComplete = 0,
301    ///1: NBYTES has been transfered
302    Complete = 1,
303}
304impl From<TC> for bool {
305    #[inline(always)]
306    fn from(variant: TC) -> Self {
307        variant as u8 != 0
308    }
309}
310///Field `TC` reader - Transfer Complete (master mode)
311pub type TC_R = crate::BitReader<TC>;
312impl TC_R {
313    ///Get enumerated values variant
314    #[inline(always)]
315    pub const fn variant(&self) -> TC {
316        match self.bits {
317            false => TC::NotComplete,
318            true => TC::Complete,
319        }
320    }
321    ///Transfer is not complete
322    #[inline(always)]
323    pub fn is_not_complete(&self) -> bool {
324        *self == TC::NotComplete
325    }
326    ///NBYTES has been transfered
327    #[inline(always)]
328    pub fn is_complete(&self) -> bool {
329        *self == TC::Complete
330    }
331}
332/**Transfer Complete Reload
333
334Value on reset: 0*/
335#[cfg_attr(feature = "defmt", derive(defmt::Format))]
336#[derive(Clone, Copy, Debug, PartialEq, Eq)]
337pub enum TCR {
338    ///0: Transfer is not complete
339    NotComplete = 0,
340    ///1: NBYTES has been transfered
341    Complete = 1,
342}
343impl From<TCR> for bool {
344    #[inline(always)]
345    fn from(variant: TCR) -> Self {
346        variant as u8 != 0
347    }
348}
349///Field `TCR` reader - Transfer Complete Reload
350pub type TCR_R = crate::BitReader<TCR>;
351impl TCR_R {
352    ///Get enumerated values variant
353    #[inline(always)]
354    pub const fn variant(&self) -> TCR {
355        match self.bits {
356            false => TCR::NotComplete,
357            true => TCR::Complete,
358        }
359    }
360    ///Transfer is not complete
361    #[inline(always)]
362    pub fn is_not_complete(&self) -> bool {
363        *self == TCR::NotComplete
364    }
365    ///NBYTES has been transfered
366    #[inline(always)]
367    pub fn is_complete(&self) -> bool {
368        *self == TCR::Complete
369    }
370}
371/**Bus error
372
373Value on reset: 0*/
374#[cfg_attr(feature = "defmt", derive(defmt::Format))]
375#[derive(Clone, Copy, Debug, PartialEq, Eq)]
376pub enum BERR {
377    ///0: No bus error
378    NoError = 0,
379    ///1: Misplaced Start and Stop condition is detected
380    Error = 1,
381}
382impl From<BERR> for bool {
383    #[inline(always)]
384    fn from(variant: BERR) -> Self {
385        variant as u8 != 0
386    }
387}
388///Field `BERR` reader - Bus error
389pub type BERR_R = crate::BitReader<BERR>;
390impl BERR_R {
391    ///Get enumerated values variant
392    #[inline(always)]
393    pub const fn variant(&self) -> BERR {
394        match self.bits {
395            false => BERR::NoError,
396            true => BERR::Error,
397        }
398    }
399    ///No bus error
400    #[inline(always)]
401    pub fn is_no_error(&self) -> bool {
402        *self == BERR::NoError
403    }
404    ///Misplaced Start and Stop condition is detected
405    #[inline(always)]
406    pub fn is_error(&self) -> bool {
407        *self == BERR::Error
408    }
409}
410/**Arbitration lost
411
412Value on reset: 0*/
413#[cfg_attr(feature = "defmt", derive(defmt::Format))]
414#[derive(Clone, Copy, Debug, PartialEq, Eq)]
415pub enum ARLO {
416    ///0: No arbitration lost
417    NotLost = 0,
418    ///1: Arbitration lost
419    Lost = 1,
420}
421impl From<ARLO> for bool {
422    #[inline(always)]
423    fn from(variant: ARLO) -> Self {
424        variant as u8 != 0
425    }
426}
427///Field `ARLO` reader - Arbitration lost
428pub type ARLO_R = crate::BitReader<ARLO>;
429impl ARLO_R {
430    ///Get enumerated values variant
431    #[inline(always)]
432    pub const fn variant(&self) -> ARLO {
433        match self.bits {
434            false => ARLO::NotLost,
435            true => ARLO::Lost,
436        }
437    }
438    ///No arbitration lost
439    #[inline(always)]
440    pub fn is_not_lost(&self) -> bool {
441        *self == ARLO::NotLost
442    }
443    ///Arbitration lost
444    #[inline(always)]
445    pub fn is_lost(&self) -> bool {
446        *self == ARLO::Lost
447    }
448}
449/**Overrun/Underrun (slave mode)
450
451Value on reset: 0*/
452#[cfg_attr(feature = "defmt", derive(defmt::Format))]
453#[derive(Clone, Copy, Debug, PartialEq, Eq)]
454pub enum OVR {
455    ///0: No overrun/underrun error occurs
456    NoOverrun = 0,
457    ///1: slave mode with NOSTRETCH=1, when an overrun/underrun error occurs
458    Overrun = 1,
459}
460impl From<OVR> for bool {
461    #[inline(always)]
462    fn from(variant: OVR) -> Self {
463        variant as u8 != 0
464    }
465}
466///Field `OVR` reader - Overrun/Underrun (slave mode)
467pub type OVR_R = crate::BitReader<OVR>;
468impl OVR_R {
469    ///Get enumerated values variant
470    #[inline(always)]
471    pub const fn variant(&self) -> OVR {
472        match self.bits {
473            false => OVR::NoOverrun,
474            true => OVR::Overrun,
475        }
476    }
477    ///No overrun/underrun error occurs
478    #[inline(always)]
479    pub fn is_no_overrun(&self) -> bool {
480        *self == OVR::NoOverrun
481    }
482    ///slave mode with NOSTRETCH=1, when an overrun/underrun error occurs
483    #[inline(always)]
484    pub fn is_overrun(&self) -> bool {
485        *self == OVR::Overrun
486    }
487}
488/**PEC Error in reception
489
490Value on reset: 0*/
491#[cfg_attr(feature = "defmt", derive(defmt::Format))]
492#[derive(Clone, Copy, Debug, PartialEq, Eq)]
493pub enum PECERR {
494    ///0: Received PEC does match with PEC register
495    Match = 0,
496    ///1: Received PEC does not match with PEC register
497    NoMatch = 1,
498}
499impl From<PECERR> for bool {
500    #[inline(always)]
501    fn from(variant: PECERR) -> Self {
502        variant as u8 != 0
503    }
504}
505///Field `PECERR` reader - PEC Error in reception
506pub type PECERR_R = crate::BitReader<PECERR>;
507impl PECERR_R {
508    ///Get enumerated values variant
509    #[inline(always)]
510    pub const fn variant(&self) -> PECERR {
511        match self.bits {
512            false => PECERR::Match,
513            true => PECERR::NoMatch,
514        }
515    }
516    ///Received PEC does match with PEC register
517    #[inline(always)]
518    pub fn is_match(&self) -> bool {
519        *self == PECERR::Match
520    }
521    ///Received PEC does not match with PEC register
522    #[inline(always)]
523    pub fn is_no_match(&self) -> bool {
524        *self == PECERR::NoMatch
525    }
526}
527/**Timeout or t_low detection flag
528
529Value on reset: 0*/
530#[cfg_attr(feature = "defmt", derive(defmt::Format))]
531#[derive(Clone, Copy, Debug, PartialEq, Eq)]
532pub enum TIMEOUT {
533    ///0: No timeout occured
534    NoTimeout = 0,
535    ///1: Timeout occured
536    Timeout = 1,
537}
538impl From<TIMEOUT> for bool {
539    #[inline(always)]
540    fn from(variant: TIMEOUT) -> Self {
541        variant as u8 != 0
542    }
543}
544///Field `TIMEOUT` reader - Timeout or t_low detection flag
545pub type TIMEOUT_R = crate::BitReader<TIMEOUT>;
546impl TIMEOUT_R {
547    ///Get enumerated values variant
548    #[inline(always)]
549    pub const fn variant(&self) -> TIMEOUT {
550        match self.bits {
551            false => TIMEOUT::NoTimeout,
552            true => TIMEOUT::Timeout,
553        }
554    }
555    ///No timeout occured
556    #[inline(always)]
557    pub fn is_no_timeout(&self) -> bool {
558        *self == TIMEOUT::NoTimeout
559    }
560    ///Timeout occured
561    #[inline(always)]
562    pub fn is_timeout(&self) -> bool {
563        *self == TIMEOUT::Timeout
564    }
565}
566/**SMBus alert
567
568Value on reset: 0*/
569#[cfg_attr(feature = "defmt", derive(defmt::Format))]
570#[derive(Clone, Copy, Debug, PartialEq, Eq)]
571pub enum ALERT {
572    ///0: SMBA alert is not detected
573    NoAlert = 0,
574    ///1: SMBA alert event is detected on SMBA pin
575    Alert = 1,
576}
577impl From<ALERT> for bool {
578    #[inline(always)]
579    fn from(variant: ALERT) -> Self {
580        variant as u8 != 0
581    }
582}
583///Field `ALERT` reader - SMBus alert
584pub type ALERT_R = crate::BitReader<ALERT>;
585impl ALERT_R {
586    ///Get enumerated values variant
587    #[inline(always)]
588    pub const fn variant(&self) -> ALERT {
589        match self.bits {
590            false => ALERT::NoAlert,
591            true => ALERT::Alert,
592        }
593    }
594    ///SMBA alert is not detected
595    #[inline(always)]
596    pub fn is_no_alert(&self) -> bool {
597        *self == ALERT::NoAlert
598    }
599    ///SMBA alert event is detected on SMBA pin
600    #[inline(always)]
601    pub fn is_alert(&self) -> bool {
602        *self == ALERT::Alert
603    }
604}
605/**Bus busy
606
607Value on reset: 0*/
608#[cfg_attr(feature = "defmt", derive(defmt::Format))]
609#[derive(Clone, Copy, Debug, PartialEq, Eq)]
610pub enum BUSY {
611    ///0: No communication is in progress on the bus
612    NotBusy = 0,
613    ///1: A communication is in progress on the bus
614    Busy = 1,
615}
616impl From<BUSY> for bool {
617    #[inline(always)]
618    fn from(variant: BUSY) -> Self {
619        variant as u8 != 0
620    }
621}
622///Field `BUSY` reader - Bus busy
623pub type BUSY_R = crate::BitReader<BUSY>;
624impl BUSY_R {
625    ///Get enumerated values variant
626    #[inline(always)]
627    pub const fn variant(&self) -> BUSY {
628        match self.bits {
629            false => BUSY::NotBusy,
630            true => BUSY::Busy,
631        }
632    }
633    ///No communication is in progress on the bus
634    #[inline(always)]
635    pub fn is_not_busy(&self) -> bool {
636        *self == BUSY::NotBusy
637    }
638    ///A communication is in progress on the bus
639    #[inline(always)]
640    pub fn is_busy(&self) -> bool {
641        *self == BUSY::Busy
642    }
643}
644/**Transfer direction (Slave mode)
645
646Value on reset: 0*/
647#[cfg_attr(feature = "defmt", derive(defmt::Format))]
648#[derive(Clone, Copy, Debug, PartialEq, Eq)]
649pub enum DIR {
650    ///0: Write transfer, slave enters receiver mode
651    Write = 0,
652    ///1: Read transfer, slave enters transmitter mode
653    Read = 1,
654}
655impl From<DIR> for bool {
656    #[inline(always)]
657    fn from(variant: DIR) -> Self {
658        variant as u8 != 0
659    }
660}
661///Field `DIR` reader - Transfer direction (Slave mode)
662pub type DIR_R = crate::BitReader<DIR>;
663impl DIR_R {
664    ///Get enumerated values variant
665    #[inline(always)]
666    pub const fn variant(&self) -> DIR {
667        match self.bits {
668            false => DIR::Write,
669            true => DIR::Read,
670        }
671    }
672    ///Write transfer, slave enters receiver mode
673    #[inline(always)]
674    pub fn is_write(&self) -> bool {
675        *self == DIR::Write
676    }
677    ///Read transfer, slave enters transmitter mode
678    #[inline(always)]
679    pub fn is_read(&self) -> bool {
680        *self == DIR::Read
681    }
682}
683///Field `ADDCODE` reader - Address match code (Slave mode)
684pub type ADDCODE_R = crate::FieldReader;
685impl R {
686    ///Bit 0 - Transmit data register empty (transmitters)
687    #[inline(always)]
688    pub fn txe(&self) -> TXE_R {
689        TXE_R::new((self.bits & 1) != 0)
690    }
691    ///Bit 1 - Transmit interrupt status (transmitters)
692    #[inline(always)]
693    pub fn txis(&self) -> TXIS_R {
694        TXIS_R::new(((self.bits >> 1) & 1) != 0)
695    }
696    ///Bit 2 - Receive data register not empty (receivers)
697    #[inline(always)]
698    pub fn rxne(&self) -> RXNE_R {
699        RXNE_R::new(((self.bits >> 2) & 1) != 0)
700    }
701    ///Bit 3 - Address matched (slave mode)
702    #[inline(always)]
703    pub fn addr(&self) -> ADDR_R {
704        ADDR_R::new(((self.bits >> 3) & 1) != 0)
705    }
706    ///Bit 4 - Not acknowledge received flag
707    #[inline(always)]
708    pub fn nackf(&self) -> NACKF_R {
709        NACKF_R::new(((self.bits >> 4) & 1) != 0)
710    }
711    ///Bit 5 - Stop detection flag
712    #[inline(always)]
713    pub fn stopf(&self) -> STOPF_R {
714        STOPF_R::new(((self.bits >> 5) & 1) != 0)
715    }
716    ///Bit 6 - Transfer Complete (master mode)
717    #[inline(always)]
718    pub fn tc(&self) -> TC_R {
719        TC_R::new(((self.bits >> 6) & 1) != 0)
720    }
721    ///Bit 7 - Transfer Complete Reload
722    #[inline(always)]
723    pub fn tcr(&self) -> TCR_R {
724        TCR_R::new(((self.bits >> 7) & 1) != 0)
725    }
726    ///Bit 8 - Bus error
727    #[inline(always)]
728    pub fn berr(&self) -> BERR_R {
729        BERR_R::new(((self.bits >> 8) & 1) != 0)
730    }
731    ///Bit 9 - Arbitration lost
732    #[inline(always)]
733    pub fn arlo(&self) -> ARLO_R {
734        ARLO_R::new(((self.bits >> 9) & 1) != 0)
735    }
736    ///Bit 10 - Overrun/Underrun (slave mode)
737    #[inline(always)]
738    pub fn ovr(&self) -> OVR_R {
739        OVR_R::new(((self.bits >> 10) & 1) != 0)
740    }
741    ///Bit 11 - PEC Error in reception
742    #[inline(always)]
743    pub fn pecerr(&self) -> PECERR_R {
744        PECERR_R::new(((self.bits >> 11) & 1) != 0)
745    }
746    ///Bit 12 - Timeout or t_low detection flag
747    #[inline(always)]
748    pub fn timeout(&self) -> TIMEOUT_R {
749        TIMEOUT_R::new(((self.bits >> 12) & 1) != 0)
750    }
751    ///Bit 13 - SMBus alert
752    #[inline(always)]
753    pub fn alert(&self) -> ALERT_R {
754        ALERT_R::new(((self.bits >> 13) & 1) != 0)
755    }
756    ///Bit 15 - Bus busy
757    #[inline(always)]
758    pub fn busy(&self) -> BUSY_R {
759        BUSY_R::new(((self.bits >> 15) & 1) != 0)
760    }
761    ///Bit 16 - Transfer direction (Slave mode)
762    #[inline(always)]
763    pub fn dir(&self) -> DIR_R {
764        DIR_R::new(((self.bits >> 16) & 1) != 0)
765    }
766    ///Bits 17:23 - Address match code (Slave mode)
767    #[inline(always)]
768    pub fn addcode(&self) -> ADDCODE_R {
769        ADDCODE_R::new(((self.bits >> 17) & 0x7f) as u8)
770    }
771}
772impl core::fmt::Debug for R {
773    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
774        f.debug_struct("ISR")
775            .field("addcode", &self.addcode())
776            .field("dir", &self.dir())
777            .field("busy", &self.busy())
778            .field("alert", &self.alert())
779            .field("timeout", &self.timeout())
780            .field("pecerr", &self.pecerr())
781            .field("ovr", &self.ovr())
782            .field("arlo", &self.arlo())
783            .field("berr", &self.berr())
784            .field("tcr", &self.tcr())
785            .field("tc", &self.tc())
786            .field("stopf", &self.stopf())
787            .field("nackf", &self.nackf())
788            .field("addr", &self.addr())
789            .field("rxne", &self.rxne())
790            .field("txis", &self.txis())
791            .field("txe", &self.txe())
792            .finish()
793    }
794}
795impl W {
796    ///Bit 0 - Transmit data register empty (transmitters)
797    #[inline(always)]
798    pub fn txe(&mut self) -> TXE_W<ISRrs> {
799        TXE_W::new(self, 0)
800    }
801    ///Bit 1 - Transmit interrupt status (transmitters)
802    #[inline(always)]
803    pub fn txis(&mut self) -> TXIS_W<ISRrs> {
804        TXIS_W::new(self, 1)
805    }
806}
807/**Interrupt and Status register
808
809You can [`read`](crate::Reg::read) this register and get [`isr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`isr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
810
811See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F779.html#I2C1:ISR)*/
812pub struct ISRrs;
813impl crate::RegisterSpec for ISRrs {
814    type Ux = u32;
815}
816///`read()` method returns [`isr::R`](R) reader structure
817impl crate::Readable for ISRrs {}
818///`write(|w| ..)` method takes [`isr::W`](W) writer structure
819impl crate::Writable for ISRrs {
820    type Safety = crate::Unsafe;
821    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x03;
822}
823///`reset()` method sets ISR to value 0x01
824impl crate::Resettable for ISRrs {
825    const RESET_VALUE: u32 = 0x01;
826}