This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I use a .lib file in my project?

Development Kit - nrf52

SDK Version - 15.0.0

IDE -  Segger Embedded Studio

Computer Platform - Windows 7 - 64 Bit

Setup : I am trying to interface an E Paper Display  with the nrf52832 chip. 

The issue is that I have a EPD.lib file and an EPD.h which includes the methods to drive the E Paper Display. I've imported both the .h and the .lib file in the project, but I'm still unable to use the methods defined in the .h file. Is there a way this can be done using the .lib file or do I need to change it to some other format like .a?

Below is the code in my EPD.h file

/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is property of Nordic Semiconductor ASA.
 * Terms and conditions of usage are described in detail in NORDIC
 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
 *
 * Licensees are granted free, non-transferable use of the information. NO
 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
 * the file.
 *
 */

/** @file
 *
 * @defgroup app_pwm Pulse-width modulation (PWM)
 * @{
 * @ingroup app_common
 *
 * @brief Module for generating a pulse-width modulated output signal.
 *
 * @details This module provides a PWM implementation using timers, GPIOTE, and PPI.
 *
 * Resource usage:
 * - 2 PPI channels per instance + 2 PPI channels per PWM channel.
 * - 1 PPI group per instance.
 * - 1 GPIOTE channel per PWM channel.
 *
 * For example, a PWM instance with two channels will consume 2+4 PPI channels, 1 PPI group, and 2 GPIOTE channels.
 *
 * The maximum number of PWM channels per instance is 2.
 */

#ifndef EPD143_H__
#define EPC143_H__

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>

//*************************//
//  EPD E014TT6  //
// GPIO Define
#define EPD_OEI			15
#define EPD_RESET		31
#define EPD_SDO			30
#define EPD_SDI			28
#define EPD_SCL			29
#define EPD_BUSY		22
#define EPD_CSB			27
/////////////////////////////////////

static uint8_t data_array_jinco[16] = "www.jinco.com.tw";

/*****************************	ET014TT6	************************/
void init_EPD(void);
void TCON_POWER_ON(int VCOM);
void TCON_POWER_OFF(void);
void write_EPD(int nbyte);
//void write_image(int imagedata);
void EPD_PanelClear(void);
void write_image(const unsigned char *img);
void write_EPDBLOCK20(void);
/*****************************************************************/
/** @} */


#endif

/** @} */

Regards,

Varun

Related