Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

arduino mfrc522 library

Status
Not open for further replies.

dizgah

Member level 5
Joined
Nov 8, 2009
Messages
91
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
iran-8par
Activity points
2,049
hi every body
i need initialing mfrc522 rfid chips for my stm32f103 mcu,
i cant find a powerfull and fully commented library for that on keil,but i find a very good library with example for arduino and need to ported this library
its my first question :
what it this monster?
Code:
/**
 * Constructor.
 * Prepares the output pins.
 */
MFRC522::MFRC522(	byte chipSelectPin,		///< Arduino pin connected to MFRC522's SPI slave select input (Pin 24, NSS, active low)
					byte resetPowerDownPin	///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low)
				) {
	// Set the chipSelectPin as digital output, do not select the slave yet
	_chipSelectPin = chipSelectPin;
	pinMode(_chipSelectPin, OUTPUT);
	digitalWrite(_chipSelectPin, HIGH);
	
	// Set the resetPowerDownPin as digital output, do not reset or power down.
	_resetPowerDownPin = resetPowerDownPin;
	pinMode(_resetPowerDownPin, OUTPUT);
	digitalWrite(_resetPowerDownPin, LOW);
	
	// Set SPI bus to work with MFRC522 chip.
	setSPIConfig();
} // End constructor
im familiar with constructor & know all of the code except :
Code:
MFRC522[B]::[/B]MFRC522(	byte chipSelectPin,byte resetPowerDownPin) {
its not like other constructor i saw ,what's meaning of :: ?,can any one descibe it ?
tnks
 

second question :
hi when i add a cpp library to keil project,it shows this error:
its while i have no problem with c libraries
tnks

1FreeMan.png
 

In

Code C - [expand]
1
MFRC522::MFRC522(   byte chipSelectPin,     ///< Arduino pin connected to MFRC522's SPI slave select input (Pin 24, NSS, active low)



The first MFRC522 before :: is the Class name and the second MFRC522(... is the method name which is in Class MFRC522. There is a name for :: but I don't remember. Read some C++ book.
 
  • Like
Reactions: dizgah

    dizgah

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top