List the names of the members in the structure

Assignment Help C/C++ Programming
Reference no: EM131044155

Assignment

LCE_Hello .c controls multiple I/O ports, GPIOA & E being two of them. Study the program carefully. We will get into each of these I/O ports one by one for the rest of the semester. This homework is to enhance the understanding on how the program configures and controls GPIOE for the LED's and GPIOA for the pushbutton, and on how the program configures and controls I2C for the LCD panel display. Answer the questions below. L stands for the line number in the program. Type your answers and submit your work to BB Learner.

Hint:

a) Place LED_Hello.c inside STM32F3_Base project. Run uVision.

b) Following each question of the homework, right click on the relevant system defined functions and the variables, and find the answers. If necessary, multiple linking may be necessary.

c) It is acceptable to copy and paste the answers from the program.

1. GPIO_InitTypeDef (L15)

a. Name the file and the line number, or the range of numbers, in that file where this structure type is defined.

b. List the names of the members in the structure.

2. GPIOE (L57)

a. Name the file and the line number in that file where GPIOE is defined.

b. What is its offset address of ODR variable from AHB3PERIPH_BASE in hex number?

c. What is a variable type of GPIOE?

3. GPIO_Init ( ) (L102)

a. Name the file and the line number in that file where this function is defined.

b. Read the block comment in the file where the function is defined.

What does this function do?

4. RCC_AHBPeriphClockCmd (RCC_AHBPeriph_GPIOE, ENABLE) (L93)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What is the hexadecimal number of RCC_AHBPeriph_GPIOE and where to find it?

c. What does this function perform? Read the block comment in the file where the function is defined.

5. Based on what you have observed, answer the following questions

a. What is the C code(s) to set RCCAHBENR for GPIOE?

b. What is the C code(s) to set MODER in GPIOA input for pin[0]?

c. What is the C code(s) to set MODER in GPIOE output for all pins?

d. What is the C code(s) to write a LED pattern of 0xff00 on ODR?

1. I2C_InitTypeDef (L140)

a. Name the file and the line number, or the range of numbers, in that file where this structure type is defined.

b. List the names of the members in the structure.

2. RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, ENABLE); (L144) (5 points)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What is the hexadecimal number of RCC_APB1Periph_I2C2 and where to find it?

c. What does this function perform? Read the block comment above the file where the function is defined.

3. I2C_Cmd(I2C2, ENABLE); (L169)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What variable does it enable?

c. What does this function perform? Read the block comment above the file where the function is defined.

4. I2C_Init(I2C2, &I2C_InitStructure); (L168)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What does this function perform? Read the block comment above the file where the function is defined.

5. I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode, I2C_Generate_Start_Write); (L177)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What does 0x50 mean? What is it?

c. What does this function perform? Read the block comment above the file where the function is defined.

6. I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) (L179)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. What flag status does this function get?

c. What does this function perform? Read the block comment above the file where the function is defined.

7. I2C_SendData(I2C2, 0xFE) (L181)

a. Name the file and the line number, or the range of numbers, in that file where this function is defined.

b. To what register is 0xFE written?

c. What does this function perform? Read the block comment above the file where the function is defined.

8. Based on what you have observed, What is the C code(s) to set RCCAPB1ENR for I2C2?

Reference no: EM131044155

Questions Cloud

Riskier stock exceed the required return : Stock R has a beta of 1.9, Stock S has a beta of 0.35, the expected rate of return on an average stock is 9%, and the risk-free rate is 5%. By how much does the required return on the riskier stock exceed the required return on the riskier stock exce..
Identify strengths and weaknesses internal : Identify strengths and weaknesses internal to the organization. Using the information you gathered in step one, continue your case study analysis by examining and making a list of the value creation functions of the company. For example, the compa..
Chosen to develop for your training program : In Unit 2, you chose a topic around which to practice the steps in creating a training program. For this assignment, use the topic you chose to perform a training needs analysis in order to identify gaps in trainee knowledge and identify the objec..
Ethics code comparison : The assignment: The following is what is required for the ethics code comparison:
List the names of the members in the structure : Name the file and the line number, or the range of numbers, in that file where this structure type is defined. List the names of the members in the structure.
Identify the place of business : Consider your current employer or the employer of a friend or close family member and respond to these points in your initial post (question/answer format not essay. 1-3 sentences per question is just fine):
Write a hipaa-compliant release of information policy : Given what you've read in this article, write a HIPAA-compliant Release of Information Policy and Procedure for Faxing Protected Health Information. Also compose a memo to accompany your policy and procedure and addressed to your hospital administ..
Experienced some training during your life-some : You have most likely experienced some training during your life-some of it good and to the point, and some of it maybe not so good.For example:
The effects of cfrp orientation on the strengthening : Prepare a literature review of given article. Article - The effects of CFRP orientation on the strengthening of reinforced concrete structures

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that reads two separate integers from user

Write a single-file program (named main.cpp) that reads two separate integers from the user, adds them together, and then outputs the answer.

  Lab9 c lab 9 c i request this twice but no answer on this

lab 9 c ltbrgti request this twice but no answer on this please could you check this for

  Write a digital music manager

Your DMM program must have a text-based interface which allows the user to select from a menu of options including: load, store, display, insert, delete, edit, sort, rate, and exit. The "load" option reads records from a file into a dynamic doubly..

  Problem regarding the database systems

To develop a database for the given case study by drawing the EER diagram-To apply the normalization rules to the data structures and hence to show the UNF, INF, 2NF, and 3NF relations of the given scenario-To create and manipulate database.

  Assignment in c you will write a program that draws a

assignment in c you will write a program that draws a single level for a rogueshylike computer game. the program will

  Computer programming

Computer programming

  Create a class called card player and deck

Write a class called "Card" with the following traits: it holds two private variables, a suit and a value (ace is high). It has public functions that randomly generate and modify the suit, value and print out the suit/value to the screen. Write a ..

  The above array is a declaration of an array of type integer

The above array is a declaration of an array of type integer. The name of the array is studentMark, and the array is of size 10. Arrays in C can be initialized by using a single statement that declares the array or by breaking it into two statements...

  Write a cpp program for magic number

Ask the user to enter a "magic number," which is an integer between 0 and 9, inclusive. Then, ask a user to enter 10 integers between 0 and 9, inclusive. If a user enters an integer outside of that range, therefore invalid, notify the user of the ..

  Write a c++ program to draw the five olympic rings

Write a C++ program to draw the five Olympic rings. Make the circles have a thickness of 5 pixel

  How do you generate arrays, random numbers

How do you generate arrays, random numbers and multiply and add rows, columns and diagonals in C

  Assume we have an array named $students

Assume we have an array named $students. Each entry in the array contains a student's full name (e.g. "Jane Smith"). Write the PHP code needed to display all students (in the array) whose first name starts with the letter "J".

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd