AnsweredAssumed Answered

cannot call a class from my own header file

Question asked by armoun.mohamad on Feb 28, 2014
Latest reply on Feb 28, 2014 by guillot.benjamin
hi guys, i create a header file , means a .cpp and a .h file .
but when i attach this file in my project in IAR compiler , it doesn't work, i mean i cannot access to my class in header file

here is my code :
SPI.h:

#include <stdint.h>

#ifndef     SPI_H_
#define SPI_H_


class spi{
     spi(int SPI_Num);
     void SPI1_Set(uint16_t ,uint16_t ,uint16_t );
     void SPI2_Set(uint16_t ,uint16_t ,uint16_t );
};                                                                                     
#endif


SPI.cpp:


 void spi::SPI1_Set(uint16_t spi_mode,uint16_t spi_direction,uint16_t spi_baudrateprescaler)
 {     
     ......
 }

void spi::SPI1_Set(uint16_t spi_mode,uint16_t spi_direction,uint16_t spi_baudrateprescaler)
 {     
      .......
 }

Outcomes