| Electronic Components Datasheet Search |
|
UM0097 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0097 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 229 page ![]() Document and library rules UM0097 10/229 #ifdef _GPIO1 GPIO1 = (GPIO_TypeDef *)GPIO1_BASE; #endif #ifdef _GPIO2 GPIO2 = (GPIO_TypeDef *)GPIO2_BASE; #endif ... } #endif /* DEBUG */ Note: Debug mode increases the code size and reduces the code performance. For this reason, it is recommended to use it only when debugging the application and to remove it from the final application code. Each peripheral has several dedicated registers which contain different flags. Registers are defined within a dedicated structure for each peripheral. Flag definition is adapted to each peripheral case (defined in 71x_ppp.h file). Flags are defined as acronyms written in upper case and prefixed by ‘PPP_’ prefix, PPP is the acronym of the corresponding peripheral. The flags of each peripheral are included in an enumeration named PPP_Flags. Some peripherals adopt this naming convention. Each flag label is defined as a byte divided into two parts: – The 3 MSB bits are allocated to identify the register to which the flag belongs (it is possible to number registers from 0 to 7). – The 5 LSB bits are allocated to identify the flag position in the register to which it belongs (it is possible to number flags from 0 to 31). The following gives an example of flag definitions: typedef enum { APB_APBT = 0x26, APB_OUTM = 0x25, APB_ABORT = 0x21, APB_ABTEN = 0x49, APB_OMnRW = 0x68, APB_TOnRW = 0x88 } APB_Flags; Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Register Bit position |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |